Class: MicrosoftGraph::Models::OAuth2PermissionGrant
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/o_auth2_permission_grant.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
-
#client_id ⇒ Object
Gets the clientId property value.
-
#client_id=(value) ⇒ Object
Sets the clientId property value.
-
#consent_type ⇒ Object
Gets the consentType property value.
-
#consent_type=(value) ⇒ Object
Sets the consentType property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new oAuth2PermissionGrant and sets the default values.
-
#principal_id ⇒ Object
Gets the principalId property value.
-
#principal_id=(value) ⇒ Object
Sets the principalId property value.
-
#resource_id ⇒ Object
Gets the resourceId property value.
-
#resource_id=(value) ⇒ Object
Sets the resourceId property value.
-
#scope ⇒ Object
Gets the scope property value.
-
#scope=(value) ⇒ Object
Sets the scope property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new oAuth2PermissionGrant and sets the default values.
58 59 60 |
# File 'lib/models/o_auth2_permission_grant.rb', line 58 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
66 67 68 69 |
# File 'lib/models/o_auth2_permission_grant.rb', line 66 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return OAuth2PermissionGrant.new end |
Instance Method Details
#client_id ⇒ Object
Gets the clientId property value. The object id (not appId) of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).
28 29 30 |
# File 'lib/models/o_auth2_permission_grant.rb', line 28 def client_id return @client_id end |
#client_id=(value) ⇒ Object
Sets the clientId property value. The object id (not appId) of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).
36 37 38 |
# File 'lib/models/o_auth2_permission_grant.rb', line 36 def client_id=(value) @client_id = value end |
#consent_type ⇒ Object
Gets the consentType property value. Indicates if authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).
43 44 45 |
# File 'lib/models/o_auth2_permission_grant.rb', line 43 def return end |
#consent_type=(value) ⇒ Object
Sets the consentType property value. Indicates if authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).
51 52 53 |
# File 'lib/models/o_auth2_permission_grant.rb', line 51 def (value) = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
74 75 76 77 78 79 80 81 82 |
# File 'lib/models/o_auth2_permission_grant.rb', line 74 def get_field_deserializers() return super.merge({ "clientId" => lambda {|n| @client_id = n.get_string_value() }, "consentType" => lambda {|n| = n.get_string_value() }, "principalId" => lambda {|n| @principal_id = n.get_string_value() }, "resourceId" => lambda {|n| @resource_id = n.get_string_value() }, "scope" => lambda {|n| @scope = n.get_string_value() }, }) end |
#principal_id ⇒ Object
Gets the principalId property value. The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only).
87 88 89 |
# File 'lib/models/o_auth2_permission_grant.rb', line 87 def principal_id return @principal_id end |
#principal_id=(value) ⇒ Object
Sets the principalId property value. The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only).
95 96 97 |
# File 'lib/models/o_auth2_permission_grant.rb', line 95 def principal_id=(value) @principal_id = value end |
#resource_id ⇒ Object
Gets the resourceId property value. The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only).
102 103 104 |
# File 'lib/models/o_auth2_permission_grant.rb', line 102 def resource_id return @resource_id end |
#resource_id=(value) ⇒ Object
Sets the resourceId property value. The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only).
110 111 112 |
# File 'lib/models/o_auth2_permission_grant.rb', line 110 def resource_id=(value) @resource_id = value end |
#scope ⇒ Object
Gets the scope property value. A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3850 characters in length.
117 118 119 |
# File 'lib/models/o_auth2_permission_grant.rb', line 117 def scope return @scope end |
#scope=(value) ⇒ Object
Sets the scope property value. A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3850 characters in length.
125 126 127 |
# File 'lib/models/o_auth2_permission_grant.rb', line 125 def scope=(value) @scope = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
133 134 135 136 137 138 139 140 141 |
# File 'lib/models/o_auth2_permission_grant.rb', line 133 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_string_value("clientId", @client_id) writer.write_string_value("consentType", ) writer.write_string_value("principalId", @principal_id) writer.write_string_value("resourceId", @resource_id) writer.write_string_value("scope", @scope) end |