Class ImmutableRolePolicyLink

java.lang.Object
org.kiwiproject.consul.model.acl.Role.RolePolicyLink
org.kiwiproject.consul.model.acl.ImmutableRolePolicyLink

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableRolePolicyLink extends Role.RolePolicyLink
Immutable implementation of Role.RolePolicyLink.

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

  • Method Details

    • id

      public Optional<String> id()
      Specified by:
      id in class Role.RolePolicyLink
      Returns:
      The value of the id attribute
    • name

      public Optional<String> name()
      Specified by:
      name in class Role.RolePolicyLink
      Returns:
      The value of the name attribute
    • withId

      public final ImmutableRolePolicyLink withId(String value)
      Copy the current immutable object by setting a present value for the optional id attribute.
      Parameters:
      value - The value for id
      Returns:
      A modified copy of this object
    • withId

      public final ImmutableRolePolicyLink withId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the id attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for id
      Returns:
      A modified copy of this object
    • withName

      public final ImmutableRolePolicyLink withName(String value)
      Copy the current immutable object by setting a present value for the optional name attribute.
      Parameters:
      value - The value for name
      Returns:
      A modified copy of this object
    • withName

      public final ImmutableRolePolicyLink withName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the name attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for name
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableRolePolicyLink 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.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableRolePolicyLink copyOf(Role.RolePolicyLink instance)
      Creates an immutable copy of a Role.RolePolicyLink 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 RolePolicyLink instance
    • builder

      public static ImmutableRolePolicyLink.Builder builder()
      Creates a builder for ImmutableRolePolicyLink.
       ImmutableRolePolicyLink.builder()
          .id(String) // optional id
          .name(String) // optional name
          .build();
       
      Returns:
      A new ImmutableRolePolicyLink builder