Package com.telenordigital.nbiot
Class ImmutableUDPOutput.Builder
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableUDPOutput.Builder
-
- Enclosing class:
- ImmutableUDPOutput
@NotThreadSafe public static final class ImmutableUDPOutput.Builder extends Object
Builds instances of typeImmutableUDPOutput. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a builder forImmutableUDPOutputinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableUDPOutputbuild()Builds a newImmutableUDPOutput.ImmutableUDPOutput.BuildercollectionID(String collectionID)Initializes the value for thecollectionIDattribute.ImmutableUDPOutput.Builderenabled(Boolean enabled)Initializes the value for theenabledattribute.ImmutableUDPOutput.Builderfrom(Output instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.Outputinstance.ImmutableUDPOutput.Builderfrom(UDPOutput instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.UDPOutputinstance.ImmutableUDPOutput.Builderhost(String host)Initializes the value for thehostattribute.ImmutableUDPOutput.Builderid(String id)Initializes the value for theidattribute.ImmutableUDPOutput.Builderport(Integer port)Initializes the value for theportattribute.ImmutableUDPOutput.BuilderputAllTags(Map<String,? extends String> entries)Put all mappings from the specified map as entries totagsmap.ImmutableUDPOutput.BuilderputTags(String key, String value)Put one entry to thetagsmap.ImmutableUDPOutput.BuilderputTags(Map.Entry<String,? extends String> entry)Put one entry to thetagsmap.ImmutableUDPOutput.Buildertags(Map<String,? extends String> entries)Sets or replaces all mappings from the specified map as entries for thetagsmap.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forImmutableUDPOutputinstances.new ImmutableUDPOutput.Builder() .id(String | null) // nullableid.collectionID(String | null) // nullablecollectionID.enabled(Boolean | null) // nullableenabled.tags(Map<String, String> | null) // nullabletags.host(String) // requiredhost.port(Integer) // requiredport.build();
-
-
Method Detail
-
from
public final ImmutableUDPOutput.Builder from(UDPOutput instance)
Fill a builder with attribute values from the providedcom.telenordigital.nbiot.UDPOutputinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableUDPOutput.Builder from(Output instance)
Fill a builder with attribute values from the providedcom.telenordigital.nbiot.Outputinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
public final ImmutableUDPOutput.Builder id(@Nullable String id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
collectionID
public final ImmutableUDPOutput.Builder collectionID(@Nullable String collectionID)
Initializes the value for thecollectionIDattribute.- Parameters:
collectionID- The value for collectionID (can benull)- Returns:
thisbuilder for use in a chained invocation
-
enabled
public final ImmutableUDPOutput.Builder enabled(@Nullable Boolean enabled)
Initializes the value for theenabledattribute.- Parameters:
enabled- The value for enabled (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putTags
public final ImmutableUDPOutput.Builder putTags(String key, String value)
Put one entry to thetagsmap.- Parameters:
key- The key in the tags mapvalue- The associated value in the tags map- Returns:
thisbuilder for use in a chained invocation
-
putTags
public final ImmutableUDPOutput.Builder putTags(Map.Entry<String,? extends String> entry)
Put one entry to thetagsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
tags
public final ImmutableUDPOutput.Builder tags(@Nullable Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for thetagsmap. Nulls are not permitted as keys or values, but parameter itself can be null- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
putAllTags
public final ImmutableUDPOutput.Builder putAllTags(Map<String,? extends String> entries)
Put all mappings from the specified map as entries totagsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
host
public final ImmutableUDPOutput.Builder host(String host)
Initializes the value for thehostattribute.- Parameters:
host- The value for host- Returns:
thisbuilder for use in a chained invocation
-
port
public final ImmutableUDPOutput.Builder port(Integer port)
Initializes the value for theportattribute.- Parameters:
port- The value for port- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableUDPOutput build()
Builds a newImmutableUDPOutput.- Returns:
- An immutable instance of UDPOutput
- Throws:
IllegalStateException- if any required attributes are missing
-
-