Class ImmutableTelemetry

java.lang.Object
org.kiwiproject.consul.model.agent.Telemetry
org.kiwiproject.consul.model.agent.ImmutableTelemetry

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableTelemetry extends Telemetry
Immutable implementation of Telemetry.

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

  • Method Details

    • getStatsiteAddr

      public String getStatsiteAddr()
      Specified by:
      getStatsiteAddr in class Telemetry
      Returns:
      The value of the statsiteAddr attribute
    • getStatsdAddr

      public String getStatsdAddr()
      Specified by:
      getStatsdAddr in class Telemetry
      Returns:
      The value of the statsdAddr attribute
    • getStatsitePrefix

      public String getStatsitePrefix()
      Specified by:
      getStatsitePrefix in class Telemetry
      Returns:
      The value of the statsitePrefix attribute
    • getDisableHostname

      public Boolean getDisableHostname()
      Specified by:
      getDisableHostname in class Telemetry
      Returns:
      The value of the disableHostname attribute
    • getDogStatsdAddr

      public String getDogStatsdAddr()
      Specified by:
      getDogStatsdAddr in class Telemetry
      Returns:
      The value of the dogStatsdAddr attribute
    • getDogStatsdTags

      public Optional<List<String>> getDogStatsdTags()
      Specified by:
      getDogStatsdTags in class Telemetry
      Returns:
      The value of the dogStatsdTags attribute
    • withStatsiteAddr

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

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

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

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

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

      public final ImmutableTelemetry withDogStatsdTags(List<String> value)
      Copy the current immutable object by setting a present value for the optional dogStatsdTags attribute.
      Parameters:
      value - The value for dogStatsdTags
      Returns:
      A modified copy of this object
    • withDogStatsdTags

      public final ImmutableTelemetry withDogStatsdTags(Optional<? extends List<String>> optional)
      Copy the current immutable object by setting an optional value for the dogStatsdTags 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 dogStatsdTags
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableTelemetry 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: statsiteAddr, statsdAddr, statsitePrefix, disableHostname, dogStatsdAddr, dogStatsdTags.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableTelemetry.Builder builder()
      Creates a builder for ImmutableTelemetry.
       ImmutableTelemetry.builder()
          .statsiteAddr(String) // required statsiteAddr
          .statsdAddr(String) // required statsdAddr
          .statsitePrefix(String) // required statsitePrefix
          .disableHostname(Boolean) // required disableHostname
          .dogStatsdAddr(String) // required dogStatsdAddr
          .dogStatsdTags(List&lt;String&gt;) // optional dogStatsdTags
          .build();
       
      Returns:
      A new ImmutableTelemetry builder