Class ImmutableHdesCreds

java.lang.Object
io.resys.hdes.client.api.ImmutableHdesCreds
All Implemented Interfaces:
HdesStore.HdesCreds

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableHdesCreds extends Object implements HdesStore.HdesCreds
Immutable implementation of HdesStore.HdesCreds.

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

  • Method Details

    • getUser

      public String getUser()
      Specified by:
      getUser in interface HdesStore.HdesCreds
      Returns:
      The value of the user attribute
    • getEmail

      public String getEmail()
      Specified by:
      getEmail in interface HdesStore.HdesCreds
      Returns:
      The value of the email attribute
    • withUser

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

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

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

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

      public static ImmutableHdesCreds copyOf(HdesStore.HdesCreds instance)
      Creates an immutable copy of a HdesStore.HdesCreds 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 HdesCreds instance
    • builder

      public static ImmutableHdesCreds.Builder builder()
      Creates a builder for ImmutableHdesCreds.
       ImmutableHdesCreds.builder()
          .user(String) // required user
          .email(String) // required email
          .build();
       
      Returns:
      A new ImmutableHdesCreds builder