Class: AsposeEmailCloud::MapiCalendarRecurrencePatternDto
- Inherits:
-
Object
- Object
- AsposeEmailCloud::MapiCalendarRecurrencePatternDto
- Defined in:
- lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb
Overview
Mapi recurrence pattern.
Direct Known Subclasses
MapiCalendarDailyRecurrencePatternDto, MapiCalendarWeeklyRecurrencePatternDto, MapiCalendarYearlyAndMonthlyRecurrencePatternDto
Instance Attribute Summary collapse
-
#calendar_type ⇒ String
Enumerated the calendar type of the mapi recurrence.
-
#deleted_instance_dates ⇒ Array<DateTime>
An array of dates, each of which is the original instance date of either a deleted instance or a modified instance for this recurrence.
-
#end_date ⇒ DateTime
End date of an item recurrence pattern.
-
#end_type ⇒ String
Enumerates the ending type for the recurrence.
-
#exceptions ⇒ Array<MapiCalendarExceptionInfoDto>
An exception specifies changes to an instance of a recurring series.
-
#frequency ⇒ String
Enumerates mapi calendar recurrence frequency.
-
#modified_instance_dates ⇒ Array<DateTime>
An array of dates, each of which is the date of a modified instance.
-
#occurrence_count ⇒ Integer
Number of occurrences in a recurrence.
-
#pattern_type ⇒ String
Enumerates the mapi calendar recurrence pattern types.
-
#period ⇒ Integer
Interval at which the meeting pattern repeats.
-
#sliding_flag ⇒ BOOLEAN
Defines whether pattern is sliding or not.
-
#start_date ⇒ DateTime
Start date of an item recurrence pattern.
-
#week_start_day ⇒ String
Day of week.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
#discriminator ⇒ Object
getter method.
-
#discriminator=(discriminator) ⇒ Object
setter method, parameter ignored.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(calendar_type: nil, deleted_instance_dates: nil, end_date: nil, end_type: nil, exceptions: nil, frequency: nil, modified_instance_dates: nil, occurrence_count: nil, pattern_type: nil, period: nil, sliding_flag: nil, start_date: nil, week_start_day: nil) ⇒ MapiCalendarRecurrencePatternDto
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(calendar_type: nil, deleted_instance_dates: nil, end_date: nil, end_type: nil, exceptions: nil, frequency: nil, modified_instance_dates: nil, occurrence_count: nil, pattern_type: nil, period: nil, sliding_flag: nil, start_date: nil, week_start_day: nil) ⇒ MapiCalendarRecurrencePatternDto
Initializes the object
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 131 def initialize( calendar_type: nil, deleted_instance_dates: nil, end_date: nil, end_type: nil, exceptions: nil, frequency: nil, modified_instance_dates: nil, occurrence_count: nil, pattern_type: nil, period: nil, sliding_flag: nil, start_date: nil, week_start_day: nil) self.calendar_type = calendar_type if calendar_type self.deleted_instance_dates = deleted_instance_dates if deleted_instance_dates self.end_date = end_date if end_date self.end_type = end_type if end_type self.exceptions = exceptions if exceptions self.frequency = frequency if frequency self.modified_instance_dates = modified_instance_dates if modified_instance_dates self.occurrence_count = occurrence_count if occurrence_count self.pattern_type = pattern_type if pattern_type self.period = period if period self.sliding_flag = sliding_flag if sliding_flag self.start_date = start_date if start_date self.week_start_day = week_start_day if week_start_day end |
Instance Attribute Details
#calendar_type ⇒ String
Enumerated the calendar type of the mapi recurrence. Enum, available values: Default, CalGregorian, CalGregorianUs, CalJapan, CalTaiwan, CalKorea, CalHijri, CalThai, CalHebrew, CalGregorianMeFrench, CalGregorianArabic, CalGregorianXLitEnglish, CalGregorianXLitFrench, CalLunarJapanese, CalChineseLunar, CalSaka, CalLunarEtoChn, CalLunarEtoKor, CalLunarRokuyou, CalLunarKorean, CalUmAlQura
33 34 35 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 33 def calendar_type @calendar_type end |
#deleted_instance_dates ⇒ Array<DateTime>
An array of dates, each of which is the original instance date of either a deleted instance or a modified instance for this recurrence.
36 37 38 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 36 def deleted_instance_dates @deleted_instance_dates end |
#end_date ⇒ DateTime
End date of an item recurrence pattern.
39 40 41 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 39 def end_date @end_date end |
#end_type ⇒ String
Enumerates the ending type for the recurrence. Enum, available values: None, EndAfterDate, EndAfterNOccurrences, NeverEnd
42 43 44 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 42 def end_type @end_type end |
#exceptions ⇒ Array<MapiCalendarExceptionInfoDto>
An exception specifies changes to an instance of a recurring series.
45 46 47 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 45 def exceptions @exceptions end |
#frequency ⇒ String
Enumerates mapi calendar recurrence frequency. Enum, available values: None, Daily, Weekly, Monthly, Yearly
48 49 50 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 48 def frequency @frequency end |
#modified_instance_dates ⇒ Array<DateTime>
An array of dates, each of which is the date of a modified instance.
51 52 53 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 51 def modified_instance_dates @modified_instance_dates end |
#occurrence_count ⇒ Integer
Number of occurrences in a recurrence.
54 55 56 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 54 def occurrence_count @occurrence_count end |
#pattern_type ⇒ String
Enumerates the mapi calendar recurrence pattern types. Enum, available values: Day, Week, Month, MonthEnd, MonthNth, HjMonth, HjMonthNth, HjMonthEnd
57 58 59 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 57 def pattern_type @pattern_type end |
#period ⇒ Integer
Interval at which the meeting pattern repeats.
60 61 62 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 60 def period @period end |
#sliding_flag ⇒ BOOLEAN
Defines whether pattern is sliding or not.
63 64 65 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 63 def sliding_flag @sliding_flag end |
#start_date ⇒ DateTime
Start date of an item recurrence pattern.
66 67 68 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 66 def start_date @start_date end |
#week_start_day ⇒ String
Day of week. Enum, available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
69 70 71 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 69 def week_start_day @week_start_day end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 78 def self.attribute_map { :'calendar_type' => :'calendarType', :'deleted_instance_dates' => :'deletedInstanceDates', :'end_date' => :'endDate', :'end_type' => :'endType', :'exceptions' => :'exceptions', :'frequency' => :'frequency', :'modified_instance_dates' => :'modifiedInstanceDates', :'occurrence_count' => :'occurrenceCount', :'pattern_type' => :'patternType', :'period' => :'period', :'sliding_flag' => :'slidingFlag', :'start_date' => :'startDate', :'week_start_day' => :'weekStartDay', :'discriminator' => :'discriminator' } end |
.swagger_types ⇒ Object
Attribute type mapping.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 98 def self.swagger_types { :'calendar_type' => :'String', :'deleted_instance_dates' => :'Array<DateTime>', :'end_date' => :'DateTime', :'end_type' => :'String', :'exceptions' => :'Array<MapiCalendarExceptionInfoDto>', :'frequency' => :'String', :'modified_instance_dates' => :'Array<DateTime>', :'occurrence_count' => :'Integer', :'pattern_type' => :'String', :'period' => :'Integer', :'sliding_flag' => :'BOOLEAN', :'start_date' => :'DateTime', :'week_start_day' => :'String', :'discriminator' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 230 def ==(o) return true if self.equal?(o) self.class == o.class && calendar_type == o.calendar_type && deleted_instance_dates == o.deleted_instance_dates && end_date == o.end_date && end_type == o.end_type && exceptions == o.exceptions && frequency == o.frequency && modified_instance_dates == o.modified_instance_dates && occurrence_count == o.occurrence_count && pattern_type == o.pattern_type && period == o.period && sliding_flag == o.sliding_flag && start_date == o.start_date && week_start_day == o.week_start_day && discriminator == o.discriminator end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 287 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model sub_type = value[:type] || value[:discriminator] || type if AsposeEmailCloud.const_defined?(sub_type) type = sub_type end temp_model = AsposeEmailCloud.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 357 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 264 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| attribute_key = self.class.attribute_map[key] attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[attribute_key].is_a?(Array) self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) }) end elsif !attributes[attribute_key].nil? self.send("#{key}=", _deserialize(type, attributes[attribute_key])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#discriminator ⇒ Object
getter method
70 71 72 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 70 def discriminator #getter method self.class.name.split('::').last end |
#discriminator=(discriminator) ⇒ Object
setter method, parameter ignored
74 75 76 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 74 def discriminator=(discriminator) #setter method, parameter ignored @discriminator = self.class.name.split('::').last end |
#eql?(o) ⇒ Boolean
251 252 253 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 251 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
257 258 259 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 257 def hash [calendar_type, deleted_instance_dates, end_date, end_type, exceptions, frequency, modified_instance_dates, occurrence_count, pattern_type, period, sliding_flag, start_date, week_start_day, discriminator].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 162 def list_invalid_properties invalid_properties = Array.new if @calendar_type.nil? invalid_properties.push('invalid value for "calendar_type", calendar_type cannot be nil.') end if @end_date.nil? invalid_properties.push('invalid value for "end_date", end_date cannot be nil.') end if @end_type.nil? invalid_properties.push('invalid value for "end_type", end_type cannot be nil.') end if @frequency.nil? invalid_properties.push('invalid value for "frequency", frequency cannot be nil.') end if @occurrence_count.nil? invalid_properties.push('invalid value for "occurrence_count", occurrence_count cannot be nil.') end if @pattern_type.nil? invalid_properties.push('invalid value for "pattern_type", pattern_type cannot be nil.') end if @period.nil? invalid_properties.push('invalid value for "period", period cannot be nil.') end if @sliding_flag.nil? invalid_properties.push('invalid value for "sliding_flag", sliding_flag cannot be nil.') end if @start_date.nil? invalid_properties.push('invalid value for "start_date", start_date cannot be nil.') end if @week_start_day.nil? invalid_properties.push('invalid value for "week_start_day", week_start_day cannot be nil.') end if @discriminator.nil? invalid_properties.push('invalid value for "discriminator", discriminator cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
337 338 339 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 337 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
343 344 345 346 347 348 349 350 351 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 343 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
331 332 333 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 331 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb', line 213 def valid? return false if @calendar_type.nil? return false if @end_date.nil? return false if @end_type.nil? return false if @frequency.nil? return false if @occurrence_count.nil? return false if @pattern_type.nil? return false if @period.nil? return false if @sliding_flag.nil? return false if @start_date.nil? return false if @week_start_day.nil? return false if @discriminator.nil? true end |