Class: MicrosoftGraph::Models::Calendar

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/calendar.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new calendar and sets the default values.



187
188
189
# File 'lib/models/calendar.rb', line 187

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a calendar

Raises:

  • (StandardError)


195
196
197
198
# File 'lib/models/calendar.rb', line 195

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Calendar.new
end

Instance Method Details

#allowed_online_meeting_providersObject

Gets the allowedOnlineMeetingProviders property value. Represent the online meeting service providers that can be used to create online meetings in this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness.

Returns:

  • a online_meeting_provider_type



67
68
69
# File 'lib/models/calendar.rb', line 67

def allowed_online_meeting_providers
    return @allowed_online_meeting_providers
end

#allowed_online_meeting_providers=(value) ⇒ Object

Sets the allowedOnlineMeetingProviders property value. Represent the online meeting service providers that can be used to create online meetings in this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness.

Parameters:

  • value

    Value to set for the allowedOnlineMeetingProviders property.

Returns:

  • a void



75
76
77
# File 'lib/models/calendar.rb', line 75

def allowed_online_meeting_providers=(value)
    @allowed_online_meeting_providers = value
end

#calendar_permissionsObject

Gets the calendarPermissions property value. The permissions of the users with whom the calendar is shared.

Returns:

  • a calendar_permission



82
83
84
# File 'lib/models/calendar.rb', line 82

def calendar_permissions
    return @calendar_permissions
end

#calendar_permissions=(value) ⇒ Object

Sets the calendarPermissions property value. The permissions of the users with whom the calendar is shared.

Parameters:

  • value

    Value to set for the calendarPermissions property.

Returns:

  • a void



90
91
92
# File 'lib/models/calendar.rb', line 90

def calendar_permissions=(value)
    @calendar_permissions = value
end

#calendar_viewObject

Gets the calendarView property value. The calendar view for the calendar. Navigation property. Read-only.

Returns:

  • a event



97
98
99
# File 'lib/models/calendar.rb', line 97

def calendar_view
    return @calendar_view
end

#calendar_view=(value) ⇒ Object

Sets the calendarView property value. The calendar view for the calendar. Navigation property. Read-only.

Parameters:

  • value

    Value to set for the calendarView property.

Returns:

  • a void



105
106
107
# File 'lib/models/calendar.rb', line 105

def calendar_view=(value)
    @calendar_view = value
end

#can_editObject

Gets the canEdit property value. true if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who has been shared a calendar and granted write access.

Returns:

  • a boolean



112
113
114
# File 'lib/models/calendar.rb', line 112

def can_edit
    return @can_edit
end

#can_edit=(value) ⇒ Object

Sets the canEdit property value. true if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who has been shared a calendar and granted write access.

Parameters:

  • value

    Value to set for the canEdit property.

Returns:

  • a void



120
121
122
# File 'lib/models/calendar.rb', line 120

def can_edit=(value)
    @can_edit = value
end

#can_shareObject

Gets the canShare property value. true if the user has the permission to share the calendar, false otherwise. Only the user who created the calendar can share it.

Returns:

  • a boolean



127
128
129
# File 'lib/models/calendar.rb', line 127

def can_share
    return @can_share
end

#can_share=(value) ⇒ Object

Sets the canShare property value. true if the user has the permission to share the calendar, false otherwise. Only the user who created the calendar can share it.

Parameters:

  • value

    Value to set for the canShare property.

Returns:

  • a void



135
136
137
# File 'lib/models/calendar.rb', line 135

def can_share=(value)
    @can_share = value
end

#can_view_private_itemsObject

Gets the canViewPrivateItems property value. true if the user can read calendar items that have been marked private, false otherwise.

Returns:

  • a boolean



142
143
144
# File 'lib/models/calendar.rb', line 142

def can_view_private_items
    return @can_view_private_items
end

#can_view_private_items=(value) ⇒ Object

Sets the canViewPrivateItems property value. true if the user can read calendar items that have been marked private, false otherwise.

Parameters:

  • value

    Value to set for the canViewPrivateItems property.

Returns:

  • a void



150
151
152
# File 'lib/models/calendar.rb', line 150

def can_view_private_items=(value)
    @can_view_private_items = value
end

#change_keyObject

Gets the changeKey property value. Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only.

Returns:

  • a string



157
158
159
# File 'lib/models/calendar.rb', line 157

def change_key
    return @change_key
end

#change_key=(value) ⇒ Object

Sets the changeKey property value. Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only.

Parameters:

  • value

    Value to set for the changeKey property.

Returns:

  • a void



165
166
167
# File 'lib/models/calendar.rb', line 165

def change_key=(value)
    @change_key = value
end

#colorObject

Gets the color property value. Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor.

Returns:

  • a calendar_color



172
173
174
# File 'lib/models/calendar.rb', line 172

def color
    return @color
end

#color=(value) ⇒ Object

Sets the color property value. Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor.

Parameters:

  • value

    Value to set for the color property.

Returns:

  • a void



180
181
182
# File 'lib/models/calendar.rb', line 180

def color=(value)
    @color = value
end

#default_online_meeting_providerObject

Gets the defaultOnlineMeetingProvider property value. The default online meeting provider for meetings sent from this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness.

Returns:

  • a online_meeting_provider_type



203
204
205
# File 'lib/models/calendar.rb', line 203

def default_online_meeting_provider
    return @default_online_meeting_provider
end

#default_online_meeting_provider=(value) ⇒ Object

Sets the defaultOnlineMeetingProvider property value. The default online meeting provider for meetings sent from this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness.

Parameters:

  • value

    Value to set for the defaultOnlineMeetingProvider property.

Returns:

  • a void



211
212
213
# File 'lib/models/calendar.rb', line 211

def default_online_meeting_provider=(value)
    @default_online_meeting_provider = value
end

#eventsObject

Gets the events property value. The events in the calendar. Navigation property. Read-only.

Returns:

  • a event



218
219
220
# File 'lib/models/calendar.rb', line 218

def events
    return @events
end

#events=(value) ⇒ Object

Sets the events property value. The events in the calendar. Navigation property. Read-only.

Parameters:

  • value

    Value to set for the events property.

Returns:

  • a void



226
227
228
# File 'lib/models/calendar.rb', line 226

def events=(value)
    @events = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/models/calendar.rb', line 233

def get_field_deserializers()
    return super.merge({
        "allowedOnlineMeetingProviders" => lambda {|n| @allowed_online_meeting_providers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnlineMeetingProviderType.create_from_discriminator_value(pn) }) },
        "calendarPermissions" => lambda {|n| @calendar_permissions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CalendarPermission.create_from_discriminator_value(pn) }) },
        "calendarView" => lambda {|n| @calendar_view = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Event.create_from_discriminator_value(pn) }) },
        "canEdit" => lambda {|n| @can_edit = n.get_boolean_value() },
        "canShare" => lambda {|n| @can_share = n.get_boolean_value() },
        "canViewPrivateItems" => lambda {|n| @can_view_private_items = n.get_boolean_value() },
        "changeKey" => lambda {|n| @change_key = n.get_string_value() },
        "color" => lambda {|n| @color = n.get_enum_value(MicrosoftGraph::Models::CalendarColor) },
        "defaultOnlineMeetingProvider" => lambda {|n| @default_online_meeting_provider = n.get_enum_value(MicrosoftGraph::Models::OnlineMeetingProviderType) },
        "events" => lambda {|n| @events = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Event.create_from_discriminator_value(pn) }) },
        "hexColor" => lambda {|n| @hex_color = n.get_string_value() },
        "isDefaultCalendar" => lambda {|n| @is_default_calendar = n.get_boolean_value() },
        "isRemovable" => lambda {|n| @is_removable = n.get_boolean_value() },
        "isTallyingResponses" => lambda {|n| @is_tallying_responses = n.get_boolean_value() },
        "multiValueExtendedProperties" => lambda {|n| @multi_value_extended_properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::MultiValueLegacyExtendedProperty.create_from_discriminator_value(pn) }) },
        "name" => lambda {|n| @name = n.get_string_value() },
        "owner" => lambda {|n| @owner = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::EmailAddress.create_from_discriminator_value(pn) }) },
        "singleValueExtendedProperties" => lambda {|n| @single_value_extended_properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SingleValueLegacyExtendedProperty.create_from_discriminator_value(pn) }) },
    })
end

#hex_colorObject

Gets the hexColor property value. The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. If the user has never explicitly set a color for the calendar, this property is empty. Read-only.

Returns:

  • a string



259
260
261
# File 'lib/models/calendar.rb', line 259

def hex_color
    return @hex_color
end

#hex_color=(value) ⇒ Object

Sets the hexColor property value. The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. If the user has never explicitly set a color for the calendar, this property is empty. Read-only.

Parameters:

  • value

    Value to set for the hexColor property.

Returns:

  • a void



267
268
269
# File 'lib/models/calendar.rb', line 267

def hex_color=(value)
    @hex_color = value
end

#is_default_calendarObject

Gets the isDefaultCalendar property value. true if this is the default calendar where new events are created by default, false otherwise.

Returns:

  • a boolean



274
275
276
# File 'lib/models/calendar.rb', line 274

def is_default_calendar
    return @is_default_calendar
end

#is_default_calendar=(value) ⇒ Object

Sets the isDefaultCalendar property value. true if this is the default calendar where new events are created by default, false otherwise.

Parameters:

  • value

    Value to set for the isDefaultCalendar property.

Returns:

  • a void



282
283
284
# File 'lib/models/calendar.rb', line 282

def is_default_calendar=(value)
    @is_default_calendar = value
end

#is_removableObject

Gets the isRemovable property value. Indicates whether this user calendar can be deleted from the user mailbox.

Returns:

  • a boolean



289
290
291
# File 'lib/models/calendar.rb', line 289

def is_removable
    return @is_removable
end

#is_removable=(value) ⇒ Object

Sets the isRemovable property value. Indicates whether this user calendar can be deleted from the user mailbox.

Parameters:

  • value

    Value to set for the isRemovable property.

Returns:

  • a void



297
298
299
# File 'lib/models/calendar.rb', line 297

def is_removable=(value)
    @is_removable = value
end

#is_tallying_responsesObject

Gets the isTallyingResponses property value. Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users’ primary calendars support tracking of meeting responses.

Returns:

  • a boolean



304
305
306
# File 'lib/models/calendar.rb', line 304

def is_tallying_responses
    return @is_tallying_responses
end

#is_tallying_responses=(value) ⇒ Object

Sets the isTallyingResponses property value. Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users’ primary calendars support tracking of meeting responses.

Parameters:

  • value

    Value to set for the isTallyingResponses property.

Returns:

  • a void



312
313
314
# File 'lib/models/calendar.rb', line 312

def is_tallying_responses=(value)
    @is_tallying_responses = value
end

#multi_value_extended_propertiesObject

Gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the calendar. Read-only. Nullable.

Returns:

  • a multi_value_legacy_extended_property



319
320
321
# File 'lib/models/calendar.rb', line 319

def multi_value_extended_properties
    return @multi_value_extended_properties
end

#multi_value_extended_properties=(value) ⇒ Object

Sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the calendar. Read-only. Nullable.

Parameters:

  • value

    Value to set for the multiValueExtendedProperties property.

Returns:

  • a void



327
328
329
# File 'lib/models/calendar.rb', line 327

def multi_value_extended_properties=(value)
    @multi_value_extended_properties = value
end

#nameObject

Gets the name property value. The calendar name.

Returns:

  • a string



334
335
336
# File 'lib/models/calendar.rb', line 334

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. The calendar name.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



342
343
344
# File 'lib/models/calendar.rb', line 342

def name=(value)
    @name = value
end

#ownerObject

Gets the owner property value. If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user.

Returns:

  • a email_address



349
350
351
# File 'lib/models/calendar.rb', line 349

def owner
    return @owner
end

#owner=(value) ⇒ Object

Sets the owner property value. If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user.

Parameters:

  • value

    Value to set for the owner property.

Returns:

  • a void



357
358
359
# File 'lib/models/calendar.rb', line 357

def owner=(value)
    @owner = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/models/calendar.rb', line 365

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("allowedOnlineMeetingProviders", @allowed_online_meeting_providers)
    writer.write_collection_of_object_values("calendarPermissions", @calendar_permissions)
    writer.write_collection_of_object_values("calendarView", @calendar_view)
    writer.write_boolean_value("canEdit", @can_edit)
    writer.write_boolean_value("canShare", @can_share)
    writer.write_boolean_value("canViewPrivateItems", @can_view_private_items)
    writer.write_string_value("changeKey", @change_key)
    writer.write_enum_value("color", @color)
    writer.write_enum_value("defaultOnlineMeetingProvider", @default_online_meeting_provider)
    writer.write_collection_of_object_values("events", @events)
    writer.write_string_value("hexColor", @hex_color)
    writer.write_boolean_value("isDefaultCalendar", @is_default_calendar)
    writer.write_boolean_value("isRemovable", @is_removable)
    writer.write_boolean_value("isTallyingResponses", @is_tallying_responses)
    writer.write_collection_of_object_values("multiValueExtendedProperties", @multi_value_extended_properties)
    writer.write_string_value("name", @name)
    writer.write_object_value("owner", @owner)
    writer.write_collection_of_object_values("singleValueExtendedProperties", @single_value_extended_properties)
end

#single_value_extended_propertiesObject

Gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the calendar. Read-only. Nullable.

Returns:

  • a single_value_legacy_extended_property



391
392
393
# File 'lib/models/calendar.rb', line 391

def single_value_extended_properties
    return @single_value_extended_properties
end

#single_value_extended_properties=(value) ⇒ Object

Sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the calendar. Read-only. Nullable.

Parameters:

  • value

    Value to set for the singleValueExtendedProperties property.

Returns:

  • a void



399
400
401
# File 'lib/models/calendar.rb', line 399

def single_value_extended_properties=(value)
    @single_value_extended_properties = value
end