Package com.orbitz.consul.option
Class ImmutableEventOptions
- java.lang.Object
-
- com.orbitz.consul.option.EventOptions
-
- com.orbitz.consul.option.ImmutableEventOptions
-
- All Implemented Interfaces:
ParamAdder
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEventOptions extends EventOptionsImmutable implementation ofEventOptions.Use the builder to create immutable instances:
ImmutableEventOptions.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableEventOptions.BuilderBuilds instances of typeImmutableEventOptions.
-
Field Summary
-
Fields inherited from class com.orbitz.consul.option.EventOptions
BLANK
-
-
Method Summary
Modifier and Type Method Description static ImmutableEventOptions.Builderbuilder()Creates a builder forImmutableEventOptions.static ImmutableEventOptionscopyOf(EventOptions instance)Creates an immutable copy of aEventOptionsvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableEventOptionsthat have equal attribute values.java.util.Optional<java.lang.String>getDatacenter()java.util.Optional<java.lang.String>getNodeFilter()java.util.Optional<java.lang.String>getServiceFilter()java.util.Optional<java.lang.String>getTagFilter()inthashCode()Computes a hash code from attributes:toHeaders,datacenter,nodeFilter,serviceFilter,tagFilter.com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String>toHeaders()java.lang.StringtoString()Prints the immutable valueEventOptionswith attribute values.ImmutableEventOptionswithDatacenter(java.lang.String value)Copy the current immutable object by setting a present value for the optionaldatacenterattribute.ImmutableEventOptionswithDatacenter(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thedatacenterattribute.ImmutableEventOptionswithNodeFilter(java.lang.String value)Copy the current immutable object by setting a present value for the optionalnodeFilterattribute.ImmutableEventOptionswithNodeFilter(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thenodeFilterattribute.ImmutableEventOptionswithServiceFilter(java.lang.String value)Copy the current immutable object by setting a present value for the optionalserviceFilterattribute.ImmutableEventOptionswithServiceFilter(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for theserviceFilterattribute.ImmutableEventOptionswithTagFilter(java.lang.String value)Copy the current immutable object by setting a present value for the optionaltagFilterattribute.ImmutableEventOptionswithTagFilter(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thetagFilterattribute.ImmutableEventOptionswithToHeaders(java.util.Map<java.lang.String,? extends java.lang.String> entries)Copy the current immutable object by replacing thetoHeadersmap with the specified map.-
Methods inherited from class com.orbitz.consul.option.EventOptions
toQuery
-
-
-
-
Method Detail
-
toHeaders
public com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> toHeaders()
- Returns:
- The value of the
toHeadersattribute
-
getDatacenter
public java.util.Optional<java.lang.String> getDatacenter()
- Specified by:
getDatacenterin classEventOptions- Returns:
- The value of the
datacenterattribute
-
getNodeFilter
public java.util.Optional<java.lang.String> getNodeFilter()
- Specified by:
getNodeFilterin classEventOptions- Returns:
- The value of the
nodeFilterattribute
-
getServiceFilter
public java.util.Optional<java.lang.String> getServiceFilter()
- Specified by:
getServiceFilterin classEventOptions- Returns:
- The value of the
serviceFilterattribute
-
getTagFilter
public java.util.Optional<java.lang.String> getTagFilter()
- Specified by:
getTagFilterin classEventOptions- Returns:
- The value of the
tagFilterattribute
-
withToHeaders
public final ImmutableEventOptions withToHeaders(java.util.Map<java.lang.String,? extends java.lang.String> entries)
Copy the current immutable object by replacing thetoHeadersmap 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 returningthis.- Parameters:
entries- The entries to be added to the toHeaders map- Returns:
- A modified copy of
thisobject
-
withDatacenter
public final ImmutableEventOptions withDatacenter(java.lang.String value)
Copy the current immutable object by setting a present value for the optionaldatacenterattribute.- Parameters:
value- The value for datacenter- Returns:
- A modified copy of
thisobject
-
withDatacenter
public final ImmutableEventOptions withDatacenter(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thedatacenterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for datacenter- Returns:
- A modified copy of
thisobject
-
withNodeFilter
public final ImmutableEventOptions withNodeFilter(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalnodeFilterattribute.- Parameters:
value- The value for nodeFilter- Returns:
- A modified copy of
thisobject
-
withNodeFilter
public final ImmutableEventOptions withNodeFilter(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thenodeFilterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for nodeFilter- Returns:
- A modified copy of
thisobject
-
withServiceFilter
public final ImmutableEventOptions withServiceFilter(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalserviceFilterattribute.- Parameters:
value- The value for serviceFilter- Returns:
- A modified copy of
thisobject
-
withServiceFilter
public final ImmutableEventOptions withServiceFilter(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for theserviceFilterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for serviceFilter- Returns:
- A modified copy of
thisobject
-
withTagFilter
public final ImmutableEventOptions withTagFilter(java.lang.String value)
Copy the current immutable object by setting a present value for the optionaltagFilterattribute.- Parameters:
value- The value for tagFilter- Returns:
- A modified copy of
thisobject
-
withTagFilter
public final ImmutableEventOptions withTagFilter(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thetagFilterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for tagFilter- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableEventOptionsthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:toHeaders,datacenter,nodeFilter,serviceFilter,tagFilter.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueEventOptionswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableEventOptions copyOf(EventOptions instance)
Creates an immutable copy of aEventOptionsvalue. 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 EventOptions instance
-
builder
public static ImmutableEventOptions.Builder builder()
Creates a builder forImmutableEventOptions.ImmutableEventOptions.builder() .putToHeaders|putAllToHeaders(String => String) //toHeadersmappings .datacenter(String) // optionaldatacenter.nodeFilter(String) // optionalnodeFilter.serviceFilter(String) // optionalserviceFilter.tagFilter(String) // optionaltagFilter.build();- Returns:
- A new ImmutableEventOptions builder
-
-