Class ImmutableServiceProxyUpstream
java.lang.Object
org.kiwiproject.consul.model.agent.ServiceProxyUpstream
org.kiwiproject.consul.model.agent.ImmutableServiceProxyUpstream
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableServiceProxyUpstream
extends ServiceProxyUpstream
Immutable implementation of
ServiceProxyUpstream.
Use the builder to create immutable instances:
ImmutableServiceProxyUpstream.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableServiceProxyUpstream. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableServiceProxyUpstream.copyOf(ServiceProxyUpstream instance) Creates an immutable copy of aServiceProxyUpstreamvalue.booleanThis instance is equal to all instances ofImmutableServiceProxyUpstreamthat have equal attribute values.intinthashCode()Computes a hash code from attributes:destinationType,destinationName,localBindPort.toString()Prints the immutable valueServiceProxyUpstreamwith attribute values.withDestinationName(String value) Copy the current immutable object by setting a value for thedestinationNameattribute.withDestinationType(String value) Copy the current immutable object by setting a value for thedestinationTypeattribute.withLocalBindPort(int value) Copy the current immutable object by setting a value for thelocalBindPortattribute.
-
Method Details
-
getDestinationType
- Specified by:
getDestinationTypein classServiceProxyUpstream- Returns:
- The value of the
destinationTypeattribute
-
getDestinationName
- Specified by:
getDestinationNamein classServiceProxyUpstream- Returns:
- The value of the
destinationNameattribute
-
getLocalBindPort
public int getLocalBindPort()- Specified by:
getLocalBindPortin classServiceProxyUpstream- Returns:
- The value of the
localBindPortattribute
-
withDestinationType
Copy the current immutable object by setting a value for thedestinationTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for destinationType- Returns:
- A modified copy of the
thisobject
-
withDestinationName
Copy the current immutable object by setting a value for thedestinationNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for destinationName- Returns:
- A modified copy of the
thisobject
-
withLocalBindPort
Copy the current immutable object by setting a value for thelocalBindPortattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for localBindPort- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableServiceProxyUpstreamthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:destinationType,destinationName,localBindPort. -
toString
Prints the immutable valueServiceProxyUpstreamwith attribute values. -
copyOf
Creates an immutable copy of aServiceProxyUpstreamvalue. 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 ServiceProxyUpstream instance
-
builder
Creates a builder forImmutableServiceProxyUpstream.ImmutableServiceProxyUpstream.builder() .destinationType(String) // requireddestinationType.destinationName(String) // requireddestinationName.localBindPort(int) // requiredlocalBindPort.build();- Returns:
- A new ImmutableServiceProxyUpstream builder
-