Class ImmutableAclToken


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableAclToken
    extends AclToken
    Immutable implementation of AclToken.

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

    • Method Summary

      Modifier and Type Method Description
      static ImmutableAclToken.Builder builder()
      Creates a builder for ImmutableAclToken.
      static ImmutableAclToken copyOf​(AclToken instance)
      Creates an immutable copy of a AclToken value.
      boolean equals​(java.lang.Object another)
      This instance is equal to all instances of ImmutableAclToken that have equal attribute values.
      int hashCode()
      Computes a hash code from attributes: id, name, type, rules.
      java.util.Optional<java.lang.String> id()  
      java.util.Optional<java.lang.String> name()  
      java.util.Optional<java.lang.String> rules()  
      java.lang.String toString()
      Prints the immutable value AclToken with attribute values.
      java.util.Optional<java.lang.String> type()  
      ImmutableAclToken withId​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional id attribute.
      ImmutableAclToken withId​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the id attribute.
      ImmutableAclToken withName​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional name attribute.
      ImmutableAclToken withName​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the name attribute.
      ImmutableAclToken withRules​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional rules attribute.
      ImmutableAclToken withRules​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the rules attribute.
      ImmutableAclToken withType​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional type attribute.
      ImmutableAclToken withType​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the type attribute.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • id

        public java.util.Optional<java.lang.String> id()
        Specified by:
        id in class AclToken
        Returns:
        The value of the id attribute
      • name

        public java.util.Optional<java.lang.String> name()
        Specified by:
        name in class AclToken
        Returns:
        The value of the name attribute
      • type

        public java.util.Optional<java.lang.String> type()
        Specified by:
        type in class AclToken
        Returns:
        The value of the type attribute
      • rules

        public java.util.Optional<java.lang.String> rules()
        Specified by:
        rules in class AclToken
        Returns:
        The value of the rules attribute
      • withId

        public final ImmutableAclToken withId​(java.lang.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 ImmutableAclToken withId​(java.util.Optional<java.lang.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 ImmutableAclToken withName​(java.lang.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 ImmutableAclToken withName​(java.util.Optional<java.lang.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
      • withType

        public final ImmutableAclToken withType​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional type attribute.
        Parameters:
        value - The value for type
        Returns:
        A modified copy of this object
      • withType

        public final ImmutableAclToken withType​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the type 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 type
        Returns:
        A modified copy of this object
      • withRules

        public final ImmutableAclToken withRules​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional rules attribute.
        Parameters:
        value - The value for rules
        Returns:
        A modified copy of this object
      • withRules

        public final ImmutableAclToken withRules​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the rules 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 rules
        Returns:
        A modified copy of this object
      • equals

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

        public int hashCode()
        Computes a hash code from attributes: id, name, type, rules.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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

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