Package com.orbitz.consul.model.agent
Class ImmutableServiceProxyUpstream
- java.lang.Object
-
- com.orbitz.consul.model.agent.ServiceProxyUpstream
-
- com.orbitz.consul.model.agent.ImmutableServiceProxyUpstream
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableServiceProxyUpstream extends ServiceProxyUpstreamImmutable implementation ofServiceProxyUpstream.Use the builder to create immutable instances:
ImmutableServiceProxyUpstream.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableServiceProxyUpstream.BuilderBuilds instances of typeImmutableServiceProxyUpstream.
-
Method Summary
Modifier and Type Method Description static ImmutableServiceProxyUpstream.Builderbuilder()Creates a builder forImmutableServiceProxyUpstream.static ImmutableServiceProxyUpstreamcopyOf(ServiceProxyUpstream instance)Creates an immutable copy of aServiceProxyUpstreamvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableServiceProxyUpstreamthat have equal attribute values.java.lang.StringgetDestinationName()java.lang.StringgetDestinationType()intgetLocalBindPort()inthashCode()Computes a hash code from attributes:destinationType,destinationName,localBindPort.java.lang.StringtoString()Prints the immutable valueServiceProxyUpstreamwith attribute values.ImmutableServiceProxyUpstreamwithDestinationName(java.lang.String value)Copy the current immutable object by setting a value for thedestinationNameattribute.ImmutableServiceProxyUpstreamwithDestinationType(java.lang.String value)Copy the current immutable object by setting a value for thedestinationTypeattribute.ImmutableServiceProxyUpstreamwithLocalBindPort(int value)Copy the current immutable object by setting a value for thelocalBindPortattribute.
-
-
-
Method Detail
-
getDestinationType
public java.lang.String getDestinationType()
- Specified by:
getDestinationTypein classServiceProxyUpstream- Returns:
- The value of the
destinationTypeattribute
-
getDestinationName
public java.lang.String 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
public final ImmutableServiceProxyUpstream withDestinationType(java.lang.String value)
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
public final ImmutableServiceProxyUpstream withDestinationName(java.lang.String value)
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
public final ImmutableServiceProxyUpstream withLocalBindPort(int value)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableServiceProxyUpstreamthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:destinationType,destinationName,localBindPort.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueServiceProxyUpstreamwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableServiceProxyUpstream copyOf(ServiceProxyUpstream instance)
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
public static ImmutableServiceProxyUpstream.Builder builder()
Creates a builder forImmutableServiceProxyUpstream.ImmutableServiceProxyUpstream.builder() .destinationType(String) // requireddestinationType.destinationName(String) // requireddestinationName.localBindPort(int) // requiredlocalBindPort.build();- Returns:
- A new ImmutableServiceProxyUpstream builder
-
-