Package com.telenordigital.nbiot
Class ImmutableUDPOutput
- java.lang.Object
-
- com.telenordigital.nbiot.UDPOutput
-
- com.telenordigital.nbiot.ImmutableUDPOutput
-
- All Implemented Interfaces:
Output
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableUDPOutput extends UDPOutput
Immutable implementation ofUDPOutput.Use the builder to create immutable instances:
new ImmutableUDPOutput.Builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableUDPOutput.BuilderBuilds instances of typeImmutableUDPOutput.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcollectionID()The collection the output belongs to.static ImmutableUDPOutputcopyOf(UDPOutput instance)Creates an immutable copy of aUDPOutputvalue.Booleanenabled()Whether the output is enabled.booleanequals(Object another)This instance is equal to all instances ofImmutableUDPOutputthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,collectionID,enabled,tags,host,port.Stringhost()The output's host.Stringid()The output's ID.Integerport()The output's port.Map<String,String>tags()Output tags.StringtoString()Prints the immutable valueUDPOutputwith attribute values.ImmutableUDPOutputwithCollectionID(String value)Copy the current immutable object by setting a value for thecollectionIDattribute.ImmutableUDPOutputwithEnabled(Boolean value)Copy the current immutable object by setting a value for theenabledattribute.ImmutableUDPOutputwithHost(String value)Copy the current immutable object by setting a value for thehostattribute.ImmutableUDPOutputwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableUDPOutputwithPort(Integer value)Copy the current immutable object by setting a value for theportattribute.ImmutableUDPOutputwithTags(Map<String,? extends String> entries)Copy the current immutable object by replacing thetagsmap with the specified map.-
Methods inherited from class com.telenordigital.nbiot.UDPOutput
toInternal
-
-
-
-
Method Detail
-
withId
public final ImmutableUDPOutput withId(@Nullable String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id (can benull)- Returns:
- A modified copy of the
thisobject
-
withCollectionID
public final ImmutableUDPOutput withCollectionID(@Nullable String value)
Copy the current immutable object by setting a value for thecollectionIDattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for collectionID (can benull)- Returns:
- A modified copy of the
thisobject
-
withEnabled
public final ImmutableUDPOutput withEnabled(@Nullable Boolean value)
Copy the current immutable object by setting a value for theenabledattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for enabled (can benull)- Returns:
- A modified copy of the
thisobject
-
withTags
public final ImmutableUDPOutput withTags(@Nullable Map<String,? extends String> entries)
Copy the current immutable object by replacing thetagsmap 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 tags map- Returns:
- A modified copy of
thisobject
-
withHost
public final ImmutableUDPOutput withHost(String value)
Copy the current immutable object by setting a value for thehostattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for host- Returns:
- A modified copy of the
thisobject
-
withPort
public final ImmutableUDPOutput withPort(Integer value)
Copy the current immutable object by setting a value for theportattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for port- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableUDPOutputthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,collectionID,enabled,tags,host,port.
-
toString
public String toString()
Prints the immutable valueUDPOutputwith attribute values.
-
copyOf
public static ImmutableUDPOutput copyOf(UDPOutput instance)
Creates an immutable copy of aUDPOutputvalue. 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 UDPOutput instance
-
-