Class UsersWithUserPrincipalNameRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.userswithuserprincipalname.UsersWithUserPrincipalNameRequestBuilder

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

    • UsersWithUserPrincipalNameRequestBuilder

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

      public UsersWithUserPrincipalNameRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new UsersWithUserPrincipalNameRequestBuilder 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 user object. When deleted, user resources, including their mailbox and license assignments, are moved to a temporary container and if the user is restored within 30 days, these objects are restored to them. The user is also restored to any groups they were a member of. After 30 days and if not restored, the user object is permanently deleted and their assigned resources freed. To manage the deleted user object, see deletedItems.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • delete

      public void delete(@Nullable Consumer<UsersWithUserPrincipalNameRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete a user object. When deleted, user resources, including their mailbox and license assignments, are moved to a temporary container and if the user is restored within 30 days, these objects are restored to them. The user is also restored to any groups they were a member of. After 30 days and if not restored, the user object is permanently deleted and their assigned resources freed. To manage the deleted user object, see deletedItems.
      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 User get()
      Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details.
      Returns:
      a User
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • get

      @Nullable public User get(@Nullable Consumer<UsersWithUserPrincipalNameRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a User
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • patch

      @Nullable public User patch(@Nonnull User body)
      Update the properties of a user object.
      Parameters:
      body - The request body
      Returns:
      a User
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • patch

      @Nullable public User patch(@Nonnull User body, @Nullable Consumer<UsersWithUserPrincipalNameRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update the properties of a user object.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a User
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation()
      Delete a user object. When deleted, user resources, including their mailbox and license assignments, are moved to a temporary container and if the user is restored within 30 days, these objects are restored to them. The user is also restored to any groups they were a member of. After 30 days and if not restored, the user object is permanently deleted and their assigned resources freed. To manage the deleted user object, see deletedItems.
      Returns:
      a RequestInformation
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation(@Nullable Consumer<UsersWithUserPrincipalNameRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete a user object. When deleted, user resources, including their mailbox and license assignments, are moved to a temporary container and if the user is restored within 30 days, these objects are restored to them. The user is also restored to any groups they were a member of. After 30 days and if not restored, the user object is permanently deleted and their assigned resources freed. To manage the deleted user object, see deletedItems.
      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 and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<UsersWithUserPrincipalNameRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details.
      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 User body)
      Update the properties of a user object.
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull User body, @Nullable Consumer<UsersWithUserPrincipalNameRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update the properties of a user object.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

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