Class MembershipsRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.graph.memberships.MembershipsRequestBuilder

public class MembershipsRequestBuilder extends BaseRequestBuilder
  • Constructor Details

  • Method Details

    • addAsync

      public CompletableFuture<GraphMembership> addAsync(String subjectDescriptor, String containerDescriptor) throws AzDException
      Create a new membership between a container and subject.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Returns:
      Graph membership object GraphMembership
      Throws:
      AzDException - Default Api exception handler.
    • checkExistenceAsync

      public CompletableFuture<Void> checkExistenceAsync(String subjectDescriptor, String containerDescriptor) throws AzDException
      Check to see if a membership relationship between a container and subject exists.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Throws:
      AzDException - Default Api exception handler.
    • getAsync

      public CompletableFuture<GraphMembership> getAsync(String subjectDescriptor, String containerDescriptor) throws AzDException
      Get a membership relationship between a container and subject.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Returns:
      Graph membership object GraphMembership
      Throws:
      AzDException - Default Api exception handler.
    • listAsync

      public CompletableFuture<GraphMemberships> listAsync(String subjectDescriptor) throws AzDException
      Get all the memberships where this descriptor is a member in the relationship.

      NOTE: The default value for direction is 'up' meaning return all memberships where the subject is a member (e.g. all groups the subject is a member of). Alternatively, passing the direction as 'down' will return all memberships where the subject is a container (e.g. all members of the subject group).

      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      Returns:
      Collection of Graph membership object GraphMemberships
      Throws:
      AzDException - Default Api exception handler.
    • listAsync

      public CompletableFuture<GraphMemberships> listAsync(String subjectDescriptor, Consumer<MembershipsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException
      Get all the memberships where this descriptor is a member in the relationship.

      NOTE: The default value for direction is 'up' meaning return all memberships where the subject is a member (e.g. all groups the subject is a member of). Alternatively, passing the direction as 'down' will return all memberships where the subject is a container (e.g. all members of the subject group).

      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      Collection of Graph membership object GraphMemberships
      Throws:
      AzDException - Default Api exception handler.
    • deleteAsync

      public CompletableFuture<Void> deleteAsync(String subjectDescriptor, String containerDescriptor) throws AzDException
      Deletes a membership between a container and subject.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Throws:
      AzDException - Default Api exception handler.
    • add

      public GraphMembership add(String subjectDescriptor, String containerDescriptor) throws AzDException
      Create a new membership between a container and subject.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Returns:
      Graph membership object GraphMembership
      Throws:
      AzDException - Default Api exception handler.
    • checkExistence

      public Void checkExistence(String subjectDescriptor, String containerDescriptor) throws AzDException
      Check to see if a membership relationship between a container and subject exists.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Throws:
      AzDException - Default Api exception handler.
    • get

      public GraphMembership get(String subjectDescriptor, String containerDescriptor) throws AzDException
      Get a membership relationship between a container and subject.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Returns:
      Graph membership object GraphMembership
      Throws:
      AzDException - Default Api exception handler.
    • list

      public GraphMemberships list(String subjectDescriptor) throws AzDException
      Get all the memberships where this descriptor is a member in the relationship.

      NOTE: The default value for direction is 'up' meaning return all memberships where the subject is a member (e.g. all groups the subject is a member of). Alternatively, passing the direction as 'down' will return all memberships where the subject is a container (e.g. all members of the subject group).

      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      Returns:
      Collection of Graph membership object GraphMemberships
      Throws:
      AzDException - Default Api exception handler.
    • list

      public GraphMemberships list(String subjectDescriptor, Consumer<MembershipsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException
      Get all the memberships where this descriptor is a member in the relationship.

      NOTE: The default value for direction is 'up' meaning return all memberships where the subject is a member (e.g. all groups the subject is a member of). Alternatively, passing the direction as 'down' will return all memberships where the subject is a container (e.g. all members of the subject group).

      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      Collection of Graph membership object GraphMemberships
      Throws:
      AzDException - Default Api exception handler.
    • delete

      public Void delete(String subjectDescriptor, String containerDescriptor) throws AzDException
      Deletes a membership between a container and subject.
      Parameters:
      subjectDescriptor - A descriptor to a group or user that can be the child subject in the relationship.
      containerDescriptor - A descriptor to a group that can be the container in the relationship.
      Throws:
      AzDException - Default Api exception handler.