Class ImmutableRoleListResponse


@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableRoleListResponse extends RoleListResponse
Immutable implementation of RoleListResponse.

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

  • Method Details

    • id

      public String id()
      Specified by:
      id in class BaseRoleResponse
      Returns:
      The value of the id attribute
    • name

      public String name()
      Specified by:
      name in class BaseRoleResponse
      Returns:
      The value of the name attribute
    • description

      public String description()
      Specified by:
      description in class BaseRoleResponse
      Returns:
      The value of the description attribute
    • policies

      public com.google.common.collect.ImmutableList<Role.RolePolicyLink> policies()
      Specified by:
      policies in class BaseRoleResponse
      Returns:
      The value of the policies attribute
    • serviceIdentities

      public com.google.common.collect.ImmutableList<Role.RoleServiceIdentity> serviceIdentities()
      Specified by:
      serviceIdentities in class BaseRoleResponse
      Returns:
      The value of the serviceIdentities attribute
    • nodeIdentities

      public com.google.common.collect.ImmutableList<Role.RoleNodeIdentity> nodeIdentities()
      Specified by:
      nodeIdentities in class BaseRoleResponse
      Returns:
      The value of the nodeIdentities attribute
    • createIndex

      public BigInteger createIndex()
      Specified by:
      createIndex in class BaseRoleResponse
      Returns:
      The value of the createIndex attribute
    • modifyIndex

      public BigInteger modifyIndex()
      Specified by:
      modifyIndex in class BaseRoleResponse
      Returns:
      The value of the modifyIndex attribute
    • hash

      public String hash()
      Specified by:
      hash in class BaseRoleResponse
      Returns:
      The value of the hash attribute
    • withId

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

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

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

      public final ImmutableRoleListResponse withPolicies(Role.RolePolicyLink... elements)
      Copy the current immutable object with elements that replace the content of policies.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withPolicies

      public final ImmutableRoleListResponse withPolicies(Iterable<? extends Role.RolePolicyLink> elements)
      Copy the current immutable object with elements that replace the content of policies. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of policies elements to set
      Returns:
      A modified copy of this object
    • withServiceIdentities

      public final ImmutableRoleListResponse withServiceIdentities(Role.RoleServiceIdentity... elements)
      Copy the current immutable object with elements that replace the content of serviceIdentities.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withServiceIdentities

      public final ImmutableRoleListResponse withServiceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements)
      Copy the current immutable object with elements that replace the content of serviceIdentities. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of serviceIdentities elements to set
      Returns:
      A modified copy of this object
    • withNodeIdentities

      public final ImmutableRoleListResponse withNodeIdentities(Role.RoleNodeIdentity... elements)
      Copy the current immutable object with elements that replace the content of nodeIdentities.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withNodeIdentities

      public final ImmutableRoleListResponse withNodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements)
      Copy the current immutable object with elements that replace the content of nodeIdentities. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of nodeIdentities elements to set
      Returns:
      A modified copy of this object
    • withCreateIndex

      public final ImmutableRoleListResponse withCreateIndex(BigInteger value)
      Copy the current immutable object by setting a value for the createIndex attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for createIndex
      Returns:
      A modified copy of the this object
    • withModifyIndex

      public final ImmutableRoleListResponse withModifyIndex(BigInteger value)
      Copy the current immutable object by setting a value for the modifyIndex attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for modifyIndex
      Returns:
      A modified copy of the this object
    • withHash

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableRoleListResponse 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: id, name, description, policies, serviceIdentities, nodeIdentities, createIndex, modifyIndex, hash.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableRoleListResponse copyOf(RoleListResponse instance)
      Creates an immutable copy of a RoleListResponse 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 RoleListResponse instance
    • builder

      public static ImmutableRoleListResponse.Builder builder()
      Creates a builder for ImmutableRoleListResponse.
       ImmutableRoleListResponse.builder()
          .id(String) // required id
          .name(String) // required name
          .description(String) // required description
          .addPolicies|addAllPolicies(org.kiwiproject.consul.model.acl.Role.RolePolicyLink) // policies elements
          .addServiceIdentities|addAllServiceIdentities(org.kiwiproject.consul.model.acl.Role.RoleServiceIdentity) // serviceIdentities elements
          .addNodeIdentities|addAllNodeIdentities(org.kiwiproject.consul.model.acl.Role.RoleNodeIdentity) // nodeIdentities elements
          .createIndex(java.math.BigInteger) // required createIndex
          .modifyIndex(java.math.BigInteger) // required modifyIndex
          .hash(String) // required hash
          .build();
       
      Returns:
      A new ImmutableRoleListResponse builder