Class: MicrosoftGraph::Models::Permission
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/permission.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#expiration_date_time ⇒ Object
Gets the expirationDateTime property value.
-
#expiration_date_time=(value) ⇒ Object
Sets the expirationDateTime property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#granted_to ⇒ Object
Gets the grantedTo property value.
-
#granted_to=(value) ⇒ Object
Sets the grantedTo property value.
-
#granted_to_identities ⇒ Object
Gets the grantedToIdentities property value.
-
#granted_to_identities=(value) ⇒ Object
Sets the grantedToIdentities property value.
-
#granted_to_identities_v2 ⇒ Object
Gets the grantedToIdentitiesV2 property value.
-
#granted_to_identities_v2=(value) ⇒ Object
Sets the grantedToIdentitiesV2 property value.
-
#granted_to_v2 ⇒ Object
Gets the grantedToV2 property value.
-
#granted_to_v2=(value) ⇒ Object
Sets the grantedToV2 property value.
-
#has_password ⇒ Object
Gets the hasPassword property value.
-
#has_password=(value) ⇒ Object
Sets the hasPassword property value.
-
#inherited_from ⇒ Object
Gets the inheritedFrom property value.
-
#inherited_from=(value) ⇒ Object
Sets the inheritedFrom property value.
-
#initialize ⇒ Object
constructor
Instantiates a new permission and sets the default values.
-
#invitation ⇒ Object
Gets the invitation property value.
-
#invitation=(value) ⇒ Object
Sets the invitation property value.
-
#link ⇒ Object
Gets the link property value.
-
#link=(value) ⇒ Object
Sets the link property value.
-
#roles ⇒ Object
Gets the roles property value.
-
#roles=(value) ⇒ Object
Sets the roles property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#share_id ⇒ Object
Gets the shareId property value.
-
#share_id=(value) ⇒ Object
Sets the shareId property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new permission and sets the default values.
47 48 49 |
# File 'lib/models/permission.rb', line 47 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
55 56 57 58 |
# File 'lib/models/permission.rb', line 55 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return Permission.new end |
Instance Method Details
#expiration_date_time ⇒ Object
Gets the expirationDateTime property value. A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there is no expiration set for this permission. Optional.
63 64 65 |
# File 'lib/models/permission.rb', line 63 def expiration_date_time return @expiration_date_time end |
#expiration_date_time=(value) ⇒ Object
Sets the expirationDateTime property value. A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there is no expiration set for this permission. Optional.
71 72 73 |
# File 'lib/models/permission.rb', line 71 def expiration_date_time=(value) @expiration_date_time = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/models/permission.rb', line 78 def get_field_deserializers() return super.merge({ "expirationDateTime" => lambda {|n| @expiration_date_time = n.get_date_time_value() }, "grantedTo" => lambda {|n| @granted_to = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) }, "grantedToIdentities" => lambda {|n| @granted_to_identities = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) }, "grantedToIdentitiesV2" => lambda {|n| @granted_to_identities_v2 = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SharePointIdentitySet.create_from_discriminator_value(pn) }) }, "grantedToV2" => lambda {|n| @granted_to_v2 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharePointIdentitySet.create_from_discriminator_value(pn) }) }, "hasPassword" => lambda {|n| @has_password = n.get_boolean_value() }, "inheritedFrom" => lambda {|n| @inherited_from = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemReference.create_from_discriminator_value(pn) }) }, "invitation" => lambda {|n| @invitation = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharingInvitation.create_from_discriminator_value(pn) }) }, "link" => lambda {|n| @link = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharingLink.create_from_discriminator_value(pn) }) }, "roles" => lambda {|n| @roles = n.get_collection_of_primitive_values(String) }, "shareId" => lambda {|n| @share_id = n.get_string_value() }, }) end |
#granted_to ⇒ Object
Gets the grantedTo property value. The grantedTo property
97 98 99 |
# File 'lib/models/permission.rb', line 97 def granted_to return @granted_to end |
#granted_to=(value) ⇒ Object
Sets the grantedTo property value. The grantedTo property
105 106 107 |
# File 'lib/models/permission.rb', line 105 def granted_to=(value) @granted_to = value end |
#granted_to_identities ⇒ Object
Gets the grantedToIdentities property value. The grantedToIdentities property
112 113 114 |
# File 'lib/models/permission.rb', line 112 def granted_to_identities return @granted_to_identities end |
#granted_to_identities=(value) ⇒ Object
Sets the grantedToIdentities property value. The grantedToIdentities property
120 121 122 |
# File 'lib/models/permission.rb', line 120 def granted_to_identities=(value) @granted_to_identities = value end |
#granted_to_identities_v2 ⇒ Object
Gets the grantedToIdentitiesV2 property value. For link type permissions, the details of the users to whom permission was granted. Read-only.
127 128 129 |
# File 'lib/models/permission.rb', line 127 def granted_to_identities_v2 return @granted_to_identities_v2 end |
#granted_to_identities_v2=(value) ⇒ Object
Sets the grantedToIdentitiesV2 property value. For link type permissions, the details of the users to whom permission was granted. Read-only.
135 136 137 |
# File 'lib/models/permission.rb', line 135 def granted_to_identities_v2=(value) @granted_to_identities_v2 = value end |
#granted_to_v2 ⇒ Object
Gets the grantedToV2 property value. For user type permissions, the details of the users and applications for this permission. Read-only.
142 143 144 |
# File 'lib/models/permission.rb', line 142 def granted_to_v2 return @granted_to_v2 end |
#granted_to_v2=(value) ⇒ Object
Sets the grantedToV2 property value. For user type permissions, the details of the users and applications for this permission. Read-only.
150 151 152 |
# File 'lib/models/permission.rb', line 150 def granted_to_v2=(value) @granted_to_v2 = value end |
#has_password ⇒ Object
Gets the hasPassword property value. Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only..
157 158 159 |
# File 'lib/models/permission.rb', line 157 def has_password return @has_password end |
#has_password=(value) ⇒ Object
Sets the hasPassword property value. Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only..
165 166 167 |
# File 'lib/models/permission.rb', line 165 def has_password=(value) @has_password = value end |
#inherited_from ⇒ Object
Gets the inheritedFrom property value. Provides a reference to the ancestor of the current permission, if it is inherited from an ancestor. Read-only.
172 173 174 |
# File 'lib/models/permission.rb', line 172 def inherited_from return @inherited_from end |
#inherited_from=(value) ⇒ Object
Sets the inheritedFrom property value. Provides a reference to the ancestor of the current permission, if it is inherited from an ancestor. Read-only.
180 181 182 |
# File 'lib/models/permission.rb', line 180 def inherited_from=(value) @inherited_from = value end |
#invitation ⇒ Object
Gets the invitation property value. Details of any associated sharing invitation for this permission. Read-only.
187 188 189 |
# File 'lib/models/permission.rb', line 187 def invitation return @invitation end |
#invitation=(value) ⇒ Object
Sets the invitation property value. Details of any associated sharing invitation for this permission. Read-only.
195 196 197 |
# File 'lib/models/permission.rb', line 195 def invitation=(value) @invitation = value end |
#link ⇒ Object
Gets the link property value. Provides the link details of the current permission, if it is a link type permissions. Read-only.
202 203 204 |
# File 'lib/models/permission.rb', line 202 def link return @link end |
#link=(value) ⇒ Object
Sets the link property value. Provides the link details of the current permission, if it is a link type permissions. Read-only.
210 211 212 |
# File 'lib/models/permission.rb', line 210 def link=(value) @link = value end |
#roles ⇒ Object
Gets the roles property value. The type of permission, for example, read. See below for the full list of roles. Read-only.
217 218 219 |
# File 'lib/models/permission.rb', line 217 def roles return @roles end |
#roles=(value) ⇒ Object
Sets the roles property value. The type of permission, for example, read. See below for the full list of roles. Read-only.
225 226 227 |
# File 'lib/models/permission.rb', line 225 def roles=(value) @roles = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/models/permission.rb', line 233 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_date_time_value("expirationDateTime", @expiration_date_time) writer.write_object_value("grantedTo", @granted_to) writer.write_collection_of_object_values("grantedToIdentities", @granted_to_identities) writer.write_collection_of_object_values("grantedToIdentitiesV2", @granted_to_identities_v2) writer.write_object_value("grantedToV2", @granted_to_v2) writer.write_boolean_value("hasPassword", @has_password) writer.write_object_value("inheritedFrom", @inherited_from) writer.write_object_value("invitation", @invitation) writer.write_object_value("link", @link) writer.write_collection_of_primitive_values("roles", @roles) writer.write_string_value("shareId", @share_id) end |
#share_id ⇒ Object
Gets the shareId property value. A unique token that can be used to access this shared item via the shares API. Read-only.
252 253 254 |
# File 'lib/models/permission.rb', line 252 def share_id return @share_id end |
#share_id=(value) ⇒ Object
Sets the shareId property value. A unique token that can be used to access this shared item via the shares API. Read-only.
260 261 262 |
# File 'lib/models/permission.rb', line 260 def share_id=(value) @share_id = value end |