Class ImmutableServiceProxyUpstream.Builder

java.lang.Object
org.kiwiproject.consul.model.agent.ImmutableServiceProxyUpstream.Builder
Enclosing class:
ImmutableServiceProxyUpstream

public static final class ImmutableServiceProxyUpstream.Builder extends Object
Builds instances of type ImmutableServiceProxyUpstream. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder from(ServiceProxyUpstream instance)
      Fill a builder with attribute values from the provided ServiceProxyUpstream instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • destinationType

      @CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder destinationType(String destinationType)
      Initializes the value for the destinationType attribute.
      Parameters:
      destinationType - The value for destinationType
      Returns:
      this builder for use in a chained invocation
    • destinationName

      @CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder destinationName(String destinationName)
      Initializes the value for the destinationName attribute.
      Parameters:
      destinationName - The value for destinationName
      Returns:
      this builder for use in a chained invocation
    • localBindPort

      @CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder localBindPort(int localBindPort)
      Initializes the value for the localBindPort attribute.
      Parameters:
      localBindPort - The value for localBindPort
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of ServiceProxyUpstream
      Throws:
      IllegalStateException - if any required attributes are missing