Class ImmutableStoredQuery


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

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

    • Method Detail

      • getId

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

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

        public java.lang.String getSession()
        Specified by:
        getSession in class StoredQuery
        Returns:
        The value of the session attribute
      • getToken

        public java.lang.String getToken()
        Specified by:
        getToken in class StoredQuery
        Returns:
        The value of the token attribute
      • withId

        public final ImmutableStoredQuery 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 ImmutableStoredQuery 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
      • withSession

        public final ImmutableStoredQuery withSession​(java.lang.String value)
        Copy the current immutable object by setting a value for the session attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for session
        Returns:
        A modified copy of the this object
      • withToken

        public final ImmutableStoredQuery withToken​(java.lang.String value)
        Copy the current immutable object by setting a value for the token attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for token
        Returns:
        A modified copy of the this object
      • withService

        public final ImmutableStoredQuery withService​(ServiceQuery value)
        Copy the current immutable object by setting a value for the service attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for service
        Returns:
        A modified copy of the this object
      • withDns

        public final ImmutableStoredQuery withDns​(DnsQuery value)
        Copy the current immutable object by setting a value for the dns attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for dns
        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 ImmutableStoredQuery 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, session, token, service, dns.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableStoredQuery.Builder builder()
        Creates a builder for ImmutableStoredQuery.
         ImmutableStoredQuery.builder()
            .id(String) // required id
            .name(String) // required name
            .session(String) // required session
            .token(String) // required token
            .service(com.orbitz.consul.model.query.ServiceQuery) // required service
            .dns(com.orbitz.consul.model.query.DnsQuery) // required dns
            .build();
         
        Returns:
        A new ImmutableStoredQuery builder