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

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.



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.



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.



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.



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



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.



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.



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.



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.



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.



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.



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

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