Class: MicrosoftGraph::Models::CalendarPermission

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/calendar_permission.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 calendarPermission and sets the default values.



43
44
45
# File 'lib/models/calendar_permission.rb', line 43

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_permission

Raises:

  • (StandardError)


51
52
53
54
# File 'lib/models/calendar_permission.rb', line 51

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

Instance Method Details

#allowed_rolesObject

Gets the allowedRoles property value. List of allowed sharing or delegating permission levels for the calendar. Possible values are: none, freeBusyRead, limitedRead, read, write, delegateWithoutPrivateEventAccess, delegateWithPrivateEventAccess, custom.

Returns:

  • a calendar_role_type



28
29
30
# File 'lib/models/calendar_permission.rb', line 28

def allowed_roles
    return @allowed_roles
end

#allowed_roles=(value) ⇒ Object

Sets the allowedRoles property value. List of allowed sharing or delegating permission levels for the calendar. Possible values are: none, freeBusyRead, limitedRead, read, write, delegateWithoutPrivateEventAccess, delegateWithPrivateEventAccess, custom.

Parameters:

  • value

    Value to set for the allowedRoles property.

Returns:

  • a void



36
37
38
# File 'lib/models/calendar_permission.rb', line 36

def allowed_roles=(value)
    @allowed_roles = value
end

#email_addressObject

Gets the emailAddress property value. Represents a sharee or delegate who has access to the calendar. For the ‘My Organization’ sharee, the address property is null. Read-only.

Returns:

  • a email_address



59
60
61
# File 'lib/models/calendar_permission.rb', line 59

def email_address
    return @email_address
end

#email_address=(value) ⇒ Object

Sets the emailAddress property value. Represents a sharee or delegate who has access to the calendar. For the ‘My Organization’ sharee, the address property is null. Read-only.

Parameters:

  • value

    Value to set for the emailAddress property.

Returns:

  • a void



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

def email_address=(value)
    @email_address = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



74
75
76
77
78
79
80
81
82
# File 'lib/models/calendar_permission.rb', line 74

def get_field_deserializers()
    return super.merge({
        "allowedRoles" => lambda {|n| @allowed_roles = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CalendarRoleType.create_from_discriminator_value(pn) }) },
        "emailAddress" => lambda {|n| @email_address = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::EmailAddress.create_from_discriminator_value(pn) }) },
        "isInsideOrganization" => lambda {|n| @is_inside_organization = n.get_boolean_value() },
        "isRemovable" => lambda {|n| @is_removable = n.get_boolean_value() },
        "role" => lambda {|n| @role = n.get_enum_value(MicrosoftGraph::Models::CalendarRoleType) },
    })
end

#is_inside_organizationObject

Gets the isInsideOrganization property value. True if the user in context (sharee or delegate) is inside the same organization as the calendar owner.

Returns:

  • a boolean



87
88
89
# File 'lib/models/calendar_permission.rb', line 87

def is_inside_organization
    return @is_inside_organization
end

#is_inside_organization=(value) ⇒ Object

Sets the isInsideOrganization property value. True if the user in context (sharee or delegate) is inside the same organization as the calendar owner.

Parameters:

  • value

    Value to set for the isInsideOrganization property.

Returns:

  • a void



95
96
97
# File 'lib/models/calendar_permission.rb', line 95

def is_inside_organization=(value)
    @is_inside_organization = value
end

#is_removableObject

Gets the isRemovable property value. True if the user can be removed from the list of sharees or delegates for the specified calendar, false otherwise. The ‘My organization’ user determines the permissions other people within your organization have to the given calendar. You cannot remove ‘My organization’ as a sharee to a calendar.

Returns:

  • a boolean



102
103
104
# File 'lib/models/calendar_permission.rb', line 102

def is_removable
    return @is_removable
end

#is_removable=(value) ⇒ Object

Sets the isRemovable property value. True if the user can be removed from the list of sharees or delegates for the specified calendar, false otherwise. The ‘My organization’ user determines the permissions other people within your organization have to the given calendar. You cannot remove ‘My organization’ as a sharee to a calendar.

Parameters:

  • value

    Value to set for the isRemovable property.

Returns:

  • a void



110
111
112
# File 'lib/models/calendar_permission.rb', line 110

def is_removable=(value)
    @is_removable = value
end

#roleObject

Gets the role property value. Current permission level of the calendar sharee or delegate.

Returns:

  • a calendar_role_type



117
118
119
# File 'lib/models/calendar_permission.rb', line 117

def role
    return @role
end

#role=(value) ⇒ Object

Sets the role property value. Current permission level of the calendar sharee or delegate.

Parameters:

  • value

    Value to set for the role property.

Returns:

  • a void



125
126
127
# File 'lib/models/calendar_permission.rb', line 125

def role=(value)
    @role = 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)


133
134
135
136
137
138
139
140
141
# File 'lib/models/calendar_permission.rb', line 133

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("allowedRoles", @allowed_roles)
    writer.write_object_value("emailAddress", @email_address)
    writer.write_boolean_value("isInsideOrganization", @is_inside_organization)
    writer.write_boolean_value("isRemovable", @is_removable)
    writer.write_enum_value("role", @role)
end