Class: AsposeEmailCloud::CalendarDto
- Inherits:
-
Object
- Object
- AsposeEmailCloud::CalendarDto
- Defined in:
- lib/aspose-email-cloud/models/calendar_dto.rb
Overview
iCalendar document representation.
Instance Attribute Summary collapse
-
#_class ⇒ String
Defines the access classification for the calendar.
-
#attachments ⇒ Array<Attachment>
Document attachments.
-
#attendees ⇒ Array<MailAddress>
Event attendees.
-
#description ⇒ String
Description.
-
#end_date ⇒ DateTime
End date.
-
#end_time_zone ⇒ String
End time zone.
-
#flags ⇒ Array<String>
Appointment flags.
-
#is_description_html ⇒ BOOLEAN
Indicates if description is in HTML format.
-
#location ⇒ String
Location.
-
#method ⇒ String
Defines the iCalendar object method type associated with the calendar document.
-
#microsoft_busy_status ⇒ String
Specifies the BUSY status.
-
#microsoft_importance ⇒ String
Specifies the importance of a calendar object.
-
#microsoft_intended_status ⇒ String
Specifies the INTENDED status.
-
#optional_attendees ⇒ Array<MailAddress>
Optional attendees.
-
#organizer ⇒ MailAddress
Event organizer.
-
#recurrence ⇒ RecurrencePatternDto
Recurrence pattern.
-
#recurrence_string ⇒ String
Deprecated, use ‘Recurrence’ property.
-
#reminders ⇒ Array<CalendarReminder>
Reminders.
-
#sequence_id ⇒ String
The sequence id.
-
#start_date ⇒ DateTime
Start date.
-
#start_time_zone ⇒ String
Start time zone.
-
#status ⇒ String
Defines the overall status or confirmation for the calendar document.
-
#summary ⇒ String
Summary.
-
#transparency ⇒ String
Specifies whether or not this appointment is intended to be visible in availability searches.
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.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attachments: nil, attendees: nil, description: nil, end_date: nil, end_time_zone: nil, flags: nil, is_description_html: nil, location: nil, method: nil, microsoft_busy_status: nil, microsoft_intended_status: nil, optional_attendees: nil, organizer: nil, recurrence_string: nil, recurrence: nil, reminders: nil, sequence_id: nil, start_date: nil, start_time_zone: nil, status: nil, summary: nil, transparency: nil, _class: nil, microsoft_importance: nil) ⇒ CalendarDto
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(attachments: nil, attendees: nil, description: nil, end_date: nil, end_time_zone: nil, flags: nil, is_description_html: nil, location: nil, method: nil, microsoft_busy_status: nil, microsoft_intended_status: nil, optional_attendees: nil, organizer: nil, recurrence_string: nil, recurrence: nil, reminders: nil, sequence_id: nil, start_date: nil, start_time_zone: nil, status: nil, summary: nil, transparency: nil, _class: nil, microsoft_importance: nil) ⇒ CalendarDto
Initializes the object
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 188 def initialize( attachments: nil, attendees: nil, description: nil, end_date: nil, end_time_zone: nil, flags: nil, is_description_html: nil, location: nil, method: nil, microsoft_busy_status: nil, microsoft_intended_status: nil, optional_attendees: nil, organizer: nil, recurrence_string: nil, recurrence: nil, reminders: nil, sequence_id: nil, start_date: nil, start_time_zone: nil, status: nil, summary: nil, transparency: nil, _class: nil, microsoft_importance: nil) self. = if self.attendees = attendees if attendees self.description = description if description self.end_date = end_date if end_date self.end_time_zone = end_time_zone if end_time_zone self.flags = flags if flags self.is_description_html = is_description_html if is_description_html self.location = location if location self.method = method if method self.microsoft_busy_status = microsoft_busy_status if microsoft_busy_status self.microsoft_intended_status = microsoft_intended_status if microsoft_intended_status self.optional_attendees = optional_attendees if optional_attendees self.organizer = organizer if organizer self.recurrence_string = recurrence_string if recurrence_string self.recurrence = recurrence if recurrence self.reminders = reminders if reminders self.sequence_id = sequence_id if sequence_id self.start_date = start_date if start_date self.start_time_zone = start_time_zone if start_time_zone self.status = status if status self.summary = summary if summary self.transparency = transparency if transparency self._class = _class if _class self.microsoft_importance = microsoft_importance if microsoft_importance end |
Instance Attribute Details
#_class ⇒ String
Defines the access classification for the calendar. Enum, available values: Public, Private, Confidential, NotDefined
99 100 101 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 99 def _class @_class end |
#attachments ⇒ Array<Attachment>
Document attachments.
33 34 35 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 33 def @attachments end |
#attendees ⇒ Array<MailAddress>
Event attendees.
36 37 38 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 36 def attendees @attendees end |
#description ⇒ String
Description.
39 40 41 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 39 def description @description end |
#end_date ⇒ DateTime
End date.
42 43 44 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 42 def end_date @end_date end |
#end_time_zone ⇒ String
End time zone.
45 46 47 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 45 def end_time_zone @end_time_zone end |
#flags ⇒ Array<String>
Appointment flags. Items: Enumerates iCalendar flags. Enum, available values: None, AllDayEvent
48 49 50 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 48 def flags @flags end |
#is_description_html ⇒ BOOLEAN
Indicates if description is in HTML format.
51 52 53 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 51 def is_description_html @is_description_html end |
#location ⇒ String
Location.
54 55 56 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 54 def location @location end |
#method ⇒ String
Defines the iCalendar object method type associated with the calendar document. Enum, available values: None, Publish, Request, Reply, Add, Cancel, Refresh, Counter, DeclineCounter
57 58 59 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 57 def method @method end |
#microsoft_busy_status ⇒ String
Specifies the BUSY status. Enum, available values: NotDefined, Free, Tentative, Busy, Oof
60 61 62 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 60 def microsoft_busy_status @microsoft_busy_status end |
#microsoft_importance ⇒ String
Specifies the importance of a calendar object. Enum, available values: Low, Normal, High, NotDefined
102 103 104 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 102 def microsoft_importance @microsoft_importance end |
#microsoft_intended_status ⇒ String
Specifies the INTENDED status. Enum, available values: NotDefined, Free, Tentative, Busy, Oof
63 64 65 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 63 def microsoft_intended_status @microsoft_intended_status end |
#optional_attendees ⇒ Array<MailAddress>
Optional attendees.
66 67 68 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 66 def optional_attendees @optional_attendees end |
#organizer ⇒ MailAddress
Event organizer.
69 70 71 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 69 def organizer @organizer end |
#recurrence ⇒ RecurrencePatternDto
Recurrence pattern
75 76 77 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 75 def recurrence @recurrence end |
#recurrence_string ⇒ String
Deprecated, use ‘Recurrence’ property. String representation of recurrence pattern (See iCalendar RFC, "Recurrence rule" section). For example: For daily recurrence: "FREQ=DAILY;COUNT=10;WKST=MO" For monthly recurrence: "BYSETPOS=1;BYDAY=MO,TU,WE,TH,FR;FREQ=MONTHLY;INTERVAL=10;WKST=MO" For yearly recurrence: "BYMONTHDAY=30;BYMONTH=1;FREQ=YEARLY;WKST=MO"
72 73 74 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 72 def recurrence_string @recurrence_string end |
#reminders ⇒ Array<CalendarReminder>
Reminders.
78 79 80 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 78 def reminders @reminders end |
#sequence_id ⇒ String
The sequence id. Read only.
81 82 83 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 81 def sequence_id @sequence_id end |
#start_date ⇒ DateTime
Start date.
84 85 86 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 84 def start_date @start_date end |
#start_time_zone ⇒ String
Start time zone.
87 88 89 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 87 def start_time_zone @start_time_zone end |
#status ⇒ String
Defines the overall status or confirmation for the calendar document. Enum, available values: NotDefined, Cancelled, Tentative, Confirmed
90 91 92 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 90 def status @status end |
#summary ⇒ String
Summary.
93 94 95 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 93 def summary @summary end |
#transparency ⇒ String
Specifies whether or not this appointment is intended to be visible in availability searches. Enum, available values: NotDefined, Transparent, Opaque
96 97 98 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 96 def transparency @transparency end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 104 def self.attribute_map { :'attachments' => :'attachments', :'attendees' => :'attendees', :'description' => :'description', :'end_date' => :'endDate', :'end_time_zone' => :'endTimeZone', :'flags' => :'flags', :'is_description_html' => :'isDescriptionHtml', :'location' => :'location', :'method' => :'method', :'microsoft_busy_status' => :'microsoftBusyStatus', :'microsoft_intended_status' => :'microsoftIntendedStatus', :'optional_attendees' => :'optionalAttendees', :'organizer' => :'organizer', :'recurrence_string' => :'recurrenceString', :'recurrence' => :'recurrence', :'reminders' => :'reminders', :'sequence_id' => :'sequenceId', :'start_date' => :'startDate', :'start_time_zone' => :'startTimeZone', :'status' => :'status', :'summary' => :'summary', :'transparency' => :'transparency', :'_class' => :'class', :'microsoft_importance' => :'microsoftImportance' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 159 160 161 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 134 def self.swagger_types { :'attachments' => :'Array<Attachment>', :'attendees' => :'Array<MailAddress>', :'description' => :'String', :'end_date' => :'DateTime', :'end_time_zone' => :'String', :'flags' => :'Array<String>', :'is_description_html' => :'BOOLEAN', :'location' => :'String', :'method' => :'String', :'microsoft_busy_status' => :'String', :'microsoft_intended_status' => :'String', :'optional_attendees' => :'Array<MailAddress>', :'organizer' => :'MailAddress', :'recurrence_string' => :'String', :'recurrence' => :'RecurrencePatternDto', :'reminders' => :'Array<CalendarReminder>', :'sequence_id' => :'String', :'start_date' => :'DateTime', :'start_time_zone' => :'String', :'status' => :'String', :'summary' => :'String', :'transparency' => :'String', :'_class' => :'String', :'microsoft_importance' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 338 def ==(o) return true if self.equal?(o) self.class == o.class && == o. && attendees == o.attendees && description == o.description && end_date == o.end_date && end_time_zone == o.end_time_zone && flags == o.flags && is_description_html == o.is_description_html && location == o.location && method == o.method && microsoft_busy_status == o.microsoft_busy_status && microsoft_intended_status == o.microsoft_intended_status && optional_attendees == o.optional_attendees && organizer == o.organizer && recurrence_string == o.recurrence_string && recurrence == o.recurrence && reminders == o.reminders && sequence_id == o.sequence_id && start_date == o.start_date && start_time_zone == o.start_time_zone && status == o.status && summary == o.summary && transparency == o.transparency && _class == o._class && microsoft_importance == o.microsoft_importance end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 405 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
475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 475 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
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 382 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 |
#eql?(o) ⇒ Boolean
369 370 371 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 369 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
375 376 377 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 375 def hash [, attendees, description, end_date, end_time_zone, flags, is_description_html, location, method, microsoft_busy_status, microsoft_intended_status, optional_attendees, organizer, recurrence_string, recurrence, reminders, sequence_id, start_date, start_time_zone, status, summary, transparency, _class, microsoft_importance].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 241 def list_invalid_properties invalid_properties = Array.new if @attendees.nil? invalid_properties.push('invalid value for "attendees", attendees cannot be nil.') end if @end_date.nil? invalid_properties.push('invalid value for "end_date", end_date cannot be nil.') end if @is_description_html.nil? invalid_properties.push('invalid value for "is_description_html", is_description_html cannot be nil.') end if @location.nil? invalid_properties.push('invalid value for "location", location cannot be nil.') end if @location.to_s.length < 1 invalid_properties.push('invalid value for "location", the character length must be great than or equal to 1.') end if @method.nil? invalid_properties.push('invalid value for "method", method cannot be nil.') end if @microsoft_busy_status.nil? invalid_properties.push('invalid value for "microsoft_busy_status", microsoft_busy_status cannot be nil.') end if @microsoft_intended_status.nil? invalid_properties.push('invalid value for "microsoft_intended_status", microsoft_intended_status cannot be nil.') end if @organizer.nil? invalid_properties.push('invalid value for "organizer", organizer cannot be nil.') end if @start_date.nil? invalid_properties.push('invalid value for "start_date", start_date cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end if @transparency.nil? invalid_properties.push('invalid value for "transparency", transparency cannot be nil.') end if @_class.nil? invalid_properties.push('invalid value for "_class", _class cannot be nil.') end if @microsoft_importance.nil? invalid_properties.push('invalid value for "microsoft_importance", microsoft_importance cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
455 456 457 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 455 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
461 462 463 464 465 466 467 468 469 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 461 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
449 450 451 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 449 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/aspose-email-cloud/models/calendar_dto.rb', line 304 def valid? return false if @attendees.nil? return false if @end_date.nil? return false if @is_description_html.nil? return false if @location.nil? return false if @location.to_s.length < 1 return false if @method.nil? return false if @microsoft_busy_status.nil? return false if @microsoft_intended_status.nil? return false if @organizer.nil? return false if @start_date.nil? return false if @status.nil? return false if @transparency.nil? return false if @_class.nil? return false if @microsoft_importance.nil? true end |