Class ImmutableCheck


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

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

    • Method Summary

      Modifier and Type Method Description
      static ImmutableCheck.Builder builder()
      Creates a builder for ImmutableCheck.
      static ImmutableCheck copyOf​(Check instance)
      Creates an immutable copy of a Check value.
      boolean equals​(java.lang.Object another)
      This instance is equal to all instances of ImmutableCheck that have equal attribute values.
      java.util.Optional<java.util.List<java.lang.String>> getArgs()  
      java.util.Optional<java.lang.String> getDeregisterCriticalServiceAfter()  
      java.util.Optional<java.lang.String> getGrpc()  
      java.util.Optional<java.lang.Boolean> getGrpcUseTls()  
      java.util.Optional<java.lang.String> getHttp()  
      java.lang.String getId()  
      java.util.Optional<java.lang.String> getInterval()  
      java.lang.String getName()  
      java.util.Optional<java.lang.String> getNotes()  
      java.util.Optional<java.lang.String> getOutput()  
      java.util.Optional<java.lang.String> getServiceId()  
      com.google.common.collect.ImmutableList<java.lang.String> getServiceTags()  
      java.util.Optional<java.lang.String> getTcp()  
      java.util.Optional<java.lang.String> getTtl()  
      int hashCode()
      Computes a hash code from attributes: id, name, notes, output, args, interval, ttl, http, tcp, grpc, grpcUseTls, serviceId, serviceTags, deregisterCriticalServiceAfter.
      java.lang.String toString()
      Prints the immutable value Check with attribute values.
      ImmutableCheck withArgs​(java.util.List<java.lang.String> value)
      Copy the current immutable object by setting a present value for the optional args attribute.
      ImmutableCheck withArgs​(java.util.Optional<? extends java.util.List<java.lang.String>> optional)
      Copy the current immutable object by setting an optional value for the args attribute.
      ImmutableCheck withDeregisterCriticalServiceAfter​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional deregisterCriticalServiceAfter attribute.
      ImmutableCheck withDeregisterCriticalServiceAfter​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the deregisterCriticalServiceAfter attribute.
      ImmutableCheck withGrpc​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional grpc attribute.
      ImmutableCheck withGrpc​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the grpc attribute.
      ImmutableCheck withGrpcUseTls​(boolean value)
      Copy the current immutable object by setting a present value for the optional grpcUseTls attribute.
      ImmutableCheck withGrpcUseTls​(java.util.Optional<java.lang.Boolean> optional)
      Copy the current immutable object by setting an optional value for the grpcUseTls attribute.
      ImmutableCheck withHttp​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional http attribute.
      ImmutableCheck withHttp​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the http attribute.
      ImmutableCheck withId​(java.lang.String value)
      Copy the current immutable object by setting a value for the id attribute.
      ImmutableCheck withInterval​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional interval attribute.
      ImmutableCheck withInterval​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the interval attribute.
      ImmutableCheck withName​(java.lang.String value)
      Copy the current immutable object by setting a value for the name attribute.
      ImmutableCheck withNotes​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional notes attribute.
      ImmutableCheck withNotes​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the notes attribute.
      ImmutableCheck withOutput​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional output attribute.
      ImmutableCheck withOutput​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the output attribute.
      ImmutableCheck withServiceId​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional serviceId attribute.
      ImmutableCheck withServiceId​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the serviceId attribute.
      ImmutableCheck withServiceTags​(java.lang.Iterable<java.lang.String> elements)
      Copy the current immutable object with elements that replace the content of serviceTags.
      ImmutableCheck withServiceTags​(java.lang.String... elements)
      Copy the current immutable object with elements that replace the content of serviceTags.
      ImmutableCheck withTcp​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional tcp attribute.
      ImmutableCheck withTcp​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the tcp attribute.
      ImmutableCheck withTtl​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional ttl attribute.
      ImmutableCheck withTtl​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the ttl attribute.
      • Methods inherited from class com.orbitz.consul.model.agent.Check

        validate
      • Methods inherited from class java.lang.Object

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

      • getId

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

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

        public java.util.Optional<java.lang.String> getNotes()
        Specified by:
        getNotes in class Check
        Returns:
        The value of the notes attribute
      • getOutput

        public java.util.Optional<java.lang.String> getOutput()
        Specified by:
        getOutput in class Check
        Returns:
        The value of the output attribute
      • getArgs

        public java.util.Optional<java.util.List<java.lang.String>> getArgs()
        Specified by:
        getArgs in class Check
        Returns:
        The value of the args attribute
      • getInterval

        public java.util.Optional<java.lang.String> getInterval()
        Specified by:
        getInterval in class Check
        Returns:
        The value of the interval attribute
      • getTtl

        public java.util.Optional<java.lang.String> getTtl()
        Specified by:
        getTtl in class Check
        Returns:
        The value of the ttl attribute
      • getHttp

        public java.util.Optional<java.lang.String> getHttp()
        Specified by:
        getHttp in class Check
        Returns:
        The value of the http attribute
      • getTcp

        public java.util.Optional<java.lang.String> getTcp()
        Specified by:
        getTcp in class Check
        Returns:
        The value of the tcp attribute
      • getGrpc

        public java.util.Optional<java.lang.String> getGrpc()
        Specified by:
        getGrpc in class Check
        Returns:
        The value of the grpc attribute
      • getGrpcUseTls

        public java.util.Optional<java.lang.Boolean> getGrpcUseTls()
        Specified by:
        getGrpcUseTls in class Check
        Returns:
        The value of the grpcUseTls attribute
      • getServiceId

        public java.util.Optional<java.lang.String> getServiceId()
        Specified by:
        getServiceId in class Check
        Returns:
        The value of the serviceId attribute
      • getServiceTags

        public com.google.common.collect.ImmutableList<java.lang.String> getServiceTags()
        Specified by:
        getServiceTags in class Check
        Returns:
        The value of the serviceTags attribute
      • getDeregisterCriticalServiceAfter

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

        public final ImmutableCheck 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 ImmutableCheck 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
      • withNotes

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

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

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

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

        public final ImmutableCheck withArgs​(java.util.List<java.lang.String> value)
        Copy the current immutable object by setting a present value for the optional args attribute.
        Parameters:
        value - The value for args
        Returns:
        A modified copy of this object
      • withArgs

        public final ImmutableCheck withArgs​(java.util.Optional<? extends java.util.List<java.lang.String>> optional)
        Copy the current immutable object by setting an optional value for the args attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for args
        Returns:
        A modified copy of this object
      • withInterval

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

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

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

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

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

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

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

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

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

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

        public final ImmutableCheck withGrpcUseTls​(boolean value)
        Copy the current immutable object by setting a present value for the optional grpcUseTls attribute.
        Parameters:
        value - The value for grpcUseTls
        Returns:
        A modified copy of this object
      • withGrpcUseTls

        public final ImmutableCheck withGrpcUseTls​(java.util.Optional<java.lang.Boolean> optional)
        Copy the current immutable object by setting an optional value for the grpcUseTls 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 grpcUseTls
        Returns:
        A modified copy of this object
      • withServiceId

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

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

        public final ImmutableCheck withServiceTags​(java.lang.String... elements)
        Copy the current immutable object with elements that replace the content of serviceTags.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withServiceTags

        public final ImmutableCheck withServiceTags​(java.lang.Iterable<java.lang.String> elements)
        Copy the current immutable object with elements that replace the content of serviceTags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of serviceTags elements to set
        Returns:
        A modified copy of this object
      • withDeregisterCriticalServiceAfter

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

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

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableCheck 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, notes, output, args, interval, ttl, http, tcp, grpc, grpcUseTls, serviceId, serviceTags, deregisterCriticalServiceAfter.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableCheck.Builder builder()
        Creates a builder for ImmutableCheck.
         ImmutableCheck.builder()
            .id(String) // required id
            .name(String) // required name
            .notes(String) // optional notes
            .output(String) // optional output
            .args(List&lt;String&gt;) // optional args
            .interval(String) // optional interval
            .ttl(String) // optional ttl
            .http(String) // optional http
            .tcp(String) // optional tcp
            .grpc(String) // optional grpc
            .grpcUseTls(Boolean) // optional grpcUseTls
            .serviceId(String) // optional serviceId
            .addServiceTags|addAllServiceTags(String) // serviceTags elements
            .deregisterCriticalServiceAfter(String) // optional deregisterCriticalServiceAfter
            .build();
         
        Returns:
        A new ImmutableCheck builder