Class ImmutablePolicyResponse


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

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

    • Method Detail

      • id

        public java.lang.String id()
        Specified by:
        id in class BasePolicyResponse
        Returns:
        The value of the id attribute
      • name

        public java.lang.String name()
        Specified by:
        name in class BasePolicyResponse
        Returns:
        The value of the name attribute
      • datacenters

        public java.util.Optional<java.lang.String> datacenters()
        Specified by:
        datacenters in class BasePolicyResponse
        Returns:
        The value of the datacenters attribute
      • hash

        public java.lang.String hash()
        Specified by:
        hash in class BasePolicyResponse
        Returns:
        The value of the hash attribute
      • createIndex

        public java.math.BigInteger createIndex()
        Specified by:
        createIndex in class BasePolicyResponse
        Returns:
        The value of the createIndex attribute
      • modifyIndex

        public java.math.BigInteger modifyIndex()
        Specified by:
        modifyIndex in class BasePolicyResponse
        Returns:
        The value of the modifyIndex attribute
      • withId

        public final ImmutablePolicyResponse withId​(java.lang.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 ImmutablePolicyResponse withName​(java.lang.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
      • withDatacenters

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

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

        public final ImmutablePolicyResponse withHash​(java.lang.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
      • withCreateIndex

        public final ImmutablePolicyResponse withCreateIndex​(java.math.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 ImmutablePolicyResponse withModifyIndex​(java.math.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
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutablePolicyResponse 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, datacenters, hash, createIndex, modifyIndex.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutablePolicyResponse copyOf​(PolicyResponse instance)
        Creates an immutable copy of a PolicyResponse 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 PolicyResponse instance