Class ImmutableCatalogDeregistration

java.lang.Object
org.kiwiproject.consul.model.catalog.CatalogDeregistration
org.kiwiproject.consul.model.catalog.ImmutableCatalogDeregistration

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

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

  • Method Details

    • datacenter

      public Optional<String> datacenter()
      Specified by:
      datacenter in class CatalogDeregistration
      Returns:
      The value of the datacenter attribute
    • node

      public String node()
      Specified by:
      node in class CatalogDeregistration
      Returns:
      The value of the node attribute
    • checkId

      public Optional<String> checkId()
      Specified by:
      checkId in class CatalogDeregistration
      Returns:
      The value of the checkId attribute
    • serviceId

      public Optional<String> serviceId()
      Specified by:
      serviceId in class CatalogDeregistration
      Returns:
      The value of the serviceId attribute
    • writeRequest

      public Optional<WriteRequest> writeRequest()
      Specified by:
      writeRequest in class CatalogDeregistration
      Returns:
      The value of the writeRequest attribute
    • withDatacenter

      public final ImmutableCatalogDeregistration withDatacenter(String value)
      Copy the current immutable object by setting a present value for the optional datacenter attribute.
      Parameters:
      value - The value for datacenter
      Returns:
      A modified copy of this object
    • withDatacenter

      public final ImmutableCatalogDeregistration withDatacenter(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the datacenter 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 datacenter
      Returns:
      A modified copy of this object
    • withNode

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

      public final ImmutableCatalogDeregistration withCheckId(String value)
      Copy the current immutable object by setting a present value for the optional checkId attribute.
      Parameters:
      value - The value for checkId
      Returns:
      A modified copy of this object
    • withCheckId

      public final ImmutableCatalogDeregistration withCheckId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the checkId 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 checkId
      Returns:
      A modified copy of this object
    • withServiceId

      public final ImmutableCatalogDeregistration withServiceId(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 ImmutableCatalogDeregistration withServiceId(Optional<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
    • withWriteRequest

      public final ImmutableCatalogDeregistration withWriteRequest(WriteRequest value)
      Copy the current immutable object by setting a present value for the optional writeRequest attribute.
      Parameters:
      value - The value for writeRequest
      Returns:
      A modified copy of this object
    • withWriteRequest

      public final ImmutableCatalogDeregistration withWriteRequest(Optional<? extends WriteRequest> optional)
      Copy the current immutable object by setting an optional value for the writeRequest 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 writeRequest
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableCatalogDeregistration 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: datacenter, node, checkId, serviceId, writeRequest.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableCatalogDeregistration.Builder builder()
      Creates a builder for ImmutableCatalogDeregistration.
       ImmutableCatalogDeregistration.builder()
          .datacenter(String) // optional datacenter
          .node(String) // required node
          .checkId(String) // optional checkId
          .serviceId(String) // optional serviceId
          .writeRequest(org.kiwiproject.consul.model.catalog.WriteRequest) // optional writeRequest
          .build();
       
      Returns:
      A new ImmutableCatalogDeregistration builder