@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableServiceProxy extends ServiceProxy
ServiceProxy.
Use the builder to create immutable instances:
ImmutableServiceProxy.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableServiceProxy.Builder
Builds instances of type
ImmutableServiceProxy. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableServiceProxy.Builder |
builder()
Creates a builder for
ImmutableServiceProxy. |
static ImmutableServiceProxy |
copyOf(ServiceProxy instance)
Creates an immutable copy of a
ServiceProxy value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableServiceProxy that have equal attribute values. |
com.google.common.collect.ImmutableMap<String,String> |
getConfig() |
String |
getDestinationServiceId() |
String |
getDestinationServiceName() |
String |
getLocalServiceAddress() |
int |
getLocalServicePort() |
com.google.common.collect.ImmutableList<ServiceProxyUpstream> |
getUpstreams() |
int |
hashCode()
Computes a hash code from attributes:
destinationServiceName, destinationServiceId, localServiceAddress, localServicePort, config, upstreams. |
String |
toString()
Prints the immutable value
ServiceProxy with attribute values. |
ImmutableServiceProxy |
withConfig(Map<String,? extends String> entries)
Copy the current immutable object by replacing the
config map with the specified map. |
ImmutableServiceProxy |
withDestinationServiceId(String value)
Copy the current immutable object by setting a value for the
destinationServiceId attribute. |
ImmutableServiceProxy |
withDestinationServiceName(String value)
Copy the current immutable object by setting a value for the
destinationServiceName attribute. |
ImmutableServiceProxy |
withLocalServiceAddress(String value)
Copy the current immutable object by setting a value for the
localServiceAddress attribute. |
ImmutableServiceProxy |
withLocalServicePort(int value)
Copy the current immutable object by setting a value for the
localServicePort attribute. |
ImmutableServiceProxy |
withUpstreams(Iterable<? extends ServiceProxyUpstream> elements)
Copy the current immutable object with elements that replace the content of
upstreams. |
ImmutableServiceProxy |
withUpstreams(ServiceProxyUpstream... elements)
Copy the current immutable object with elements that replace the content of
upstreams. |
public String getDestinationServiceName()
getDestinationServiceName in class ServiceProxydestinationServiceName attributepublic String getDestinationServiceId()
getDestinationServiceId in class ServiceProxydestinationServiceId attributepublic String getLocalServiceAddress()
getLocalServiceAddress in class ServiceProxylocalServiceAddress attributepublic int getLocalServicePort()
getLocalServicePort in class ServiceProxylocalServicePort attributepublic com.google.common.collect.ImmutableMap<String,String> getConfig()
getConfig in class ServiceProxyconfig attributepublic com.google.common.collect.ImmutableList<ServiceProxyUpstream> getUpstreams()
getUpstreams in class ServiceProxyupstreams attributepublic final ImmutableServiceProxy withDestinationServiceName(String value)
destinationServiceName attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for destinationServiceNamethis objectpublic final ImmutableServiceProxy withDestinationServiceId(String value)
destinationServiceId attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for destinationServiceIdthis objectpublic final ImmutableServiceProxy withLocalServiceAddress(String value)
localServiceAddress attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for localServiceAddressthis objectpublic final ImmutableServiceProxy withLocalServicePort(int value)
localServicePort attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for localServicePortthis objectpublic final ImmutableServiceProxy withConfig(Map<String,? extends String> entries)
config map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the config mapthis objectpublic final ImmutableServiceProxy withUpstreams(ServiceProxyUpstream... elements)
upstreams.elements - The elements to setthis objectpublic final ImmutableServiceProxy withUpstreams(Iterable<? extends ServiceProxyUpstream> elements)
upstreams.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of upstreams elements to setthis objectpublic boolean equals(@Nullable Object another)
ImmutableServiceProxy that have equal attribute values.public int hashCode()
destinationServiceName, destinationServiceId, localServiceAddress, localServicePort, config, upstreams.public String toString()
ServiceProxy with attribute values.public static ImmutableServiceProxy copyOf(ServiceProxy instance)
ServiceProxy value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableServiceProxy.Builder builder()
ImmutableServiceProxy.
ImmutableServiceProxy.builder()
.destinationServiceName(String) // required destinationServiceName
.destinationServiceId(String) // required destinationServiceId
.localServiceAddress(String) // required localServiceAddress
.localServicePort(int) // required localServicePort
.putConfig|putAllConfig(String => String) // config mappings
.addUpstreams|addAllUpstreams(com.orbitz.consul.model.agent.ServiceProxyUpstream) // upstreams elements
.build();
Copyright © 2019. All rights reserved.