Class OAuth2PermissionGrantItemRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.oauth2permissiongrants.item.OAuth2PermissionGrantItemRequestBuilder

@Generated("com.microsoft.kiota") public class OAuth2PermissionGrantItemRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the collection of oAuth2PermissionGrant entities.
  • Constructor Details

    • OAuth2PermissionGrantItemRequestBuilder

      public OAuth2PermissionGrantItemRequestBuilder(@Nonnull HashMap<String,Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new OAuth2PermissionGrantItemRequestBuilder and sets the default values.
      Parameters:
      pathParameters - Path parameters for the request
      requestAdapter - The request adapter to use to execute the requests.
    • OAuth2PermissionGrantItemRequestBuilder

      public OAuth2PermissionGrantItemRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new OAuth2PermissionGrantItemRequestBuilder and sets the default values.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      requestAdapter - The request adapter to use to execute the requests.
  • Method Details

    • delete

      public void delete()
      Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • delete

      public void delete(@Nullable Consumer<OAuth2PermissionGrantItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • get

      @Nullable public OAuth2PermissionGrant get()
      Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user.
      Returns:
      a OAuth2PermissionGrant
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • get

      Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a OAuth2PermissionGrant
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • patch

      @Nullable public OAuth2PermissionGrant patch(@Nonnull OAuth2PermissionGrant body)
      Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes.
      Parameters:
      body - The request body
      Returns:
      a OAuth2PermissionGrant
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • patch

      @Nullable public OAuth2PermissionGrant patch(@Nonnull OAuth2PermissionGrant body, @Nullable Consumer<OAuth2PermissionGrantItemRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a OAuth2PermissionGrant
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation()
      Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant.
      Returns:
      a RequestInformation
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation(@Nullable Consumer<OAuth2PermissionGrantItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<OAuth2PermissionGrantItemRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull OAuth2PermissionGrant body)
      Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes.
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull OAuth2PermissionGrant body, @Nullable Consumer<OAuth2PermissionGrantItemRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public OAuth2PermissionGrantItemRequestBuilder withUrl(@Nonnull String rawUrl)
      Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      Returns:
      a OAuth2PermissionGrantItemRequestBuilder