Class ImmutableAccessControlEntryModifications

java.lang.Object
org.bremersee.acl.model.ImmutableAccessControlEntryModifications
All Implemented Interfaces:
Comparable<AccessControlEntryModifications>, AccessControlEntryModifications

@Generated(from="AccessControlEntryModifications", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableAccessControlEntryModifications extends Object implements AccessControlEntryModifications
Immutable implementation of AccessControlEntryModifications.

Use the builder to create immutable instances: ImmutableAccessControlEntryModifications.builder().

  • Method Details

    • getPermission

      public String getPermission()
      Specifies the permission.
      Specified by:
      getPermission in interface AccessControlEntryModifications
      Returns:
      the permission
    • isGuest

      public boolean isGuest()
      Specifies whether anybody is granted or not.
      Specified by:
      isGuest in interface AccessControlEntryModifications
      Returns:
      whether anybody is granted (true) or not (false)
    • getAddUsers

      public Set<String> getAddUsers()
      Users to be added.
      Specified by:
      getAddUsers in interface AccessControlEntryModifications
      Returns:
      the users to add
    • getRemoveUsers

      public Set<String> getRemoveUsers()
      Users to be removed.
      Specified by:
      getRemoveUsers in interface AccessControlEntryModifications
      Returns:
      the users to remove
    • getAddRoles

      public Set<String> getAddRoles()
      Roles to be added.
      Specified by:
      getAddRoles in interface AccessControlEntryModifications
      Returns:
      the roles to add
    • getRemoveRoles

      public Set<String> getRemoveRoles()
      Roles to be removed.
      Specified by:
      getRemoveRoles in interface AccessControlEntryModifications
      Returns:
      the roles to remove
    • getAddGroups

      public Set<String> getAddGroups()
      Groups to be added.
      Specified by:
      getAddGroups in interface AccessControlEntryModifications
      Returns:
      the groups to add
    • getRemoveGroups

      public Set<String> getRemoveGroups()
      Groups to be removed.
      Specified by:
      getRemoveGroups in interface AccessControlEntryModifications
      Returns:
      the groups to remove
    • withPermission

      public final ImmutableAccessControlEntryModifications withPermission(String value)
      Copy the current immutable object by setting a value for the permission attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for permission
      Returns:
      A modified copy or the this object
    • withIsGuest

      public final ImmutableAccessControlEntryModifications withIsGuest(boolean value)
      Copy the current immutable object by setting a value for the isGuest attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isGuest
      Returns:
      A modified copy or the this object
    • withAddUsers

      public final ImmutableAccessControlEntryModifications withAddUsers(String... elements)
      Copy the current immutable object with elements that replace the content of addUsers.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAddUsers

      public final ImmutableAccessControlEntryModifications withAddUsers(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of addUsers. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of addUsers elements to set
      Returns:
      A modified copy or this if not changed
    • withRemoveUsers

      public final ImmutableAccessControlEntryModifications withRemoveUsers(String... elements)
      Copy the current immutable object with elements that replace the content of removeUsers.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRemoveUsers

      public final ImmutableAccessControlEntryModifications withRemoveUsers(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of removeUsers. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of removeUsers elements to set
      Returns:
      A modified copy or this if not changed
    • withAddRoles

      public final ImmutableAccessControlEntryModifications withAddRoles(String... elements)
      Copy the current immutable object with elements that replace the content of addRoles.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAddRoles

      public final ImmutableAccessControlEntryModifications withAddRoles(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of addRoles. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of addRoles elements to set
      Returns:
      A modified copy or this if not changed
    • withRemoveRoles

      public final ImmutableAccessControlEntryModifications withRemoveRoles(String... elements)
      Copy the current immutable object with elements that replace the content of removeRoles.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRemoveRoles

      public final ImmutableAccessControlEntryModifications withRemoveRoles(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of removeRoles. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of removeRoles elements to set
      Returns:
      A modified copy or this if not changed
    • withAddGroups

      public final ImmutableAccessControlEntryModifications withAddGroups(String... elements)
      Copy the current immutable object with elements that replace the content of addGroups.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAddGroups

      public final ImmutableAccessControlEntryModifications withAddGroups(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of addGroups. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of addGroups elements to set
      Returns:
      A modified copy or this if not changed
    • withRemoveGroups

      public final ImmutableAccessControlEntryModifications withRemoveGroups(String... elements)
      Copy the current immutable object with elements that replace the content of removeGroups.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRemoveGroups

      public final ImmutableAccessControlEntryModifications withRemoveGroups(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of removeGroups. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of removeGroups elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableAccessControlEntryModifications that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: permission, isGuest, addUsers, removeUsers, addRoles, removeRoles, addGroups, removeGroups.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value AccessControlEntryModifications with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a AccessControlEntryModifications value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable AccessControlEntryModifications instance
    • builder

      Creates a builder for ImmutableAccessControlEntryModifications.
       ImmutableAccessControlEntryModifications.builder()
          .permission(String) // required permission
          .isGuest(boolean) // optional isGuest
          .addAddUsers|addAllAddUsers(String) // addUsers elements
          .addRemoveUsers|addAllRemoveUsers(String) // removeUsers elements
          .addAddRoles|addAllAddRoles(String) // addRoles elements
          .addRemoveRoles|addAllRemoveRoles(String) // removeRoles elements
          .addAddGroups|addAllAddGroups(String) // addGroups elements
          .addRemoveGroups|addAllRemoveGroups(String) // removeGroups elements
          .build();
       
      Returns:
      A new ImmutableAccessControlEntryModifications builder