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
  • Constructor Details

    • OAuth2PermissionGrant

      public OAuth2PermissionGrant()
      Instantiates a new OAuth2PermissionGrant 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

      @Nullable public String 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

      @Nullable public 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 interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      getFieldDeserializers in class Entity
      Returns:
      a Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
    • getPrincipalId

      @Nullable public String 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

      @Nullable public 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

      @Nullable public 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
      Specified by:
      serialize in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      serialize in class Entity
      Parameters:
      writer - Serialization writer to use to serialize this model
    • setClientId

      public void setClientId(@Nullable String value)
      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

      public void setConsentType(@Nullable String value)
      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

      public void setPrincipalId(@Nullable String value)
      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

      public void setResourceId(@Nullable String value)
      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

      public void setScope(@Nullable String value)
      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.