Class DirectoryRolesWithRoleTemplateIdRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.directoryroleswithroletemplateid.DirectoryRolesWithRoleTemplateIdRequestBuilder

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

    • DirectoryRolesWithRoleTemplateIdRequestBuilder

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

      public DirectoryRolesWithRoleTemplateIdRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new DirectoryRolesWithRoleTemplateIdRequestBuilder 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 entity from directoryRoles by roleTemplateId
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • delete

      public void delete(@Nullable Consumer<DirectoryRolesWithRoleTemplateIdRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete entity from directoryRoles by roleTemplateId
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • get

      @Nullable public DirectoryRole get()
      Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs.
      Returns:
      a DirectoryRole
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • get

      Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a DirectoryRole
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • patch

      @Nullable public DirectoryRole patch(@Nonnull DirectoryRole body)
      Update entity in directoryRoles by roleTemplateId
      Parameters:
      body - The request body
      Returns:
      a DirectoryRole
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • patch

      @Nullable public DirectoryRole patch(@Nonnull DirectoryRole body, @Nullable Consumer<DirectoryRolesWithRoleTemplateIdRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update entity in directoryRoles by roleTemplateId
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a DirectoryRole
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation()
      Delete entity from directoryRoles by roleTemplateId
      Returns:
      a RequestInformation
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation(@Nullable Consumer<DirectoryRolesWithRoleTemplateIdRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete entity from directoryRoles by roleTemplateId
      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 directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<DirectoryRolesWithRoleTemplateIdRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs.
      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 DirectoryRole body)
      Update entity in directoryRoles by roleTemplateId
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull DirectoryRole body, @Nullable Consumer<DirectoryRolesWithRoleTemplateIdRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update entity in directoryRoles by roleTemplateId
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public DirectoryRolesWithRoleTemplateIdRequestBuilder 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 DirectoryRolesWithRoleTemplateIdRequestBuilder