Package com.microsoft.graph.models
Class OAuth2PermissionGrant
java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.OAuth2PermissionGrant
- All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder
,com.microsoft.kiota.serialization.Parsable
,com.microsoft.kiota.store.BackedModel
@Generated("com.microsoft.kiota")
public class OAuth2PermissionGrant
extends Entity
implements com.microsoft.kiota.serialization.Parsable
-
Field Summary
Fields inherited from class com.microsoft.graph.models.Entity
backingStore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth2PermissionGrant
createFromDiscriminatorValue
(com.microsoft.kiota.serialization.ParseNode parseNode) Creates a new instance of the appropriate class based on discriminator valueGets the clientId property value.Gets the consentType property value.The deserialization information for the current modelGets the principalId property value.Gets the resourceId property value.getScope()
Gets the scope property value.void
serialize
(com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current objectvoid
setClientId
(String value) Sets the clientId property value.void
setConsentType
(String value) Sets the consentType property value.void
setPrincipalId
(String value) Sets the principalId property value.void
setResourceId
(String value) Sets the resourceId property value.void
Sets the scope property value.Methods inherited from class com.microsoft.graph.models.Entity
getAdditionalData, getBackingStore, getId, getOdataType, setAdditionalData, setBackingStore, setId, setOdataType
-
Constructor Details
-
OAuth2PermissionGrant
public OAuth2PermissionGrant()Instantiates a newOAuth2PermissionGrant
and sets the default values.
-
-
Method Details
-
createFromDiscriminatorValue
@Nonnull public static OAuth2PermissionGrant createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode) Creates a new instance of the appropriate class based on discriminator value- Parameters:
parseNode
- The parse node to use to read the discriminator value and create the object- Returns:
- a
OAuth2PermissionGrant
-
getClientId
Gets the clientId property value. The object id (not appId) of the client service principal for the application that's authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).- Returns:
- a
String
-
getConsentType
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. Nonadmin users might be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).- Returns:
- a
String
-
getFieldDeserializers
@Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()The deserialization information for the current model- Specified by:
getFieldDeserializers
in interfacecom.microsoft.kiota.serialization.Parsable
- Overrides:
getFieldDeserializers
in classEntity
- Returns:
- a
Map<String,
Consumer<com.microsoft.kiota.serialization.ParseNode>>
-
getPrincipalId
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).- Returns:
- a
String
-
getResourceId
Gets the resourceId property value. The id of the resource service principal to which access is authorized. This identifies the API that the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only).- Returns:
- a
String
-
getScope
Gets the scope property value. A space-separated list of the claim values for delegated permissions that 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 3,850 characters in length.- Returns:
- a
String
-
serialize
public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current object -
setClientId
Sets the clientId property value. The object id (not appId) of the client service principal for the application that's authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).- Parameters:
value
- Value to set for the clientId property.
-
setConsentType
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. Nonadmin users might be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).- Parameters:
value
- Value to set for the consentType property.
-
setPrincipalId
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).- Parameters:
value
- Value to set for the principalId property.
-
setResourceId
Sets the resourceId property value. The id of the resource service principal to which access is authorized. This identifies the API that the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only).- Parameters:
value
- Value to set for the resourceId property.
-
setScope
Sets the scope property value. A space-separated list of the claim values for delegated permissions that 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 3,850 characters in length.- Parameters:
value
- Value to set for the scope property.
-