Package com.telenordigital.nbiot
Class ImmutableMQTTOutput.Builder
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableMQTTOutput.Builder
-
- Enclosing class:
- ImmutableMQTTOutput
@NotThreadSafe public static final class ImmutableMQTTOutput.Builder extends Object
Builds instances of typeImmutableMQTTOutput. 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 forImmutableMQTTOutputinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableMQTTOutputbuild()Builds a newImmutableMQTTOutput.ImmutableMQTTOutput.BuilderclientID(String clientID)Initializes the value for theclientIDattribute.ImmutableMQTTOutput.BuildercollectionID(String collectionID)Initializes the value for thecollectionIDattribute.ImmutableMQTTOutput.BuilderdisableCertCheck(Boolean disableCertCheck)Initializes the value for thedisableCertCheckattribute.ImmutableMQTTOutput.Builderenabled(Boolean enabled)Initializes the value for theenabledattribute.ImmutableMQTTOutput.Builderendpoint(String endpoint)Initializes the value for theendpointattribute.ImmutableMQTTOutput.Builderfrom(MQTTOutput instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.MQTTOutputinstance.ImmutableMQTTOutput.Builderfrom(Output instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.Outputinstance.ImmutableMQTTOutput.Builderid(String id)Initializes the value for theidattribute.ImmutableMQTTOutput.Builderpassword(String password)Initializes the value for thepasswordattribute.ImmutableMQTTOutput.BuilderputAllTags(Map<String,? extends String> entries)Put all mappings from the specified map as entries totagsmap.ImmutableMQTTOutput.BuilderputTags(String key, String value)Put one entry to thetagsmap.ImmutableMQTTOutput.BuilderputTags(Map.Entry<String,? extends String> entry)Put one entry to thetagsmap.ImmutableMQTTOutput.Buildertags(Map<String,? extends String> entries)Sets or replaces all mappings from the specified map as entries for thetagsmap.ImmutableMQTTOutput.BuildertopicName(String topicName)Initializes the value for thetopicNameattribute.ImmutableMQTTOutput.Builderusername(String username)Initializes the value for theusernameattribute.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forImmutableMQTTOutputinstances.new ImmutableMQTTOutput.Builder() .id(String | null) // nullableid.collectionID(String | null) // nullablecollectionID.enabled(Boolean | null) // nullableenabled.tags(Map<String, String> | null) // nullabletags.endpoint(String) // requiredendpoint.disableCertCheck(Boolean | null) // nullabledisableCertCheck.username(String | null) // nullableusername.password(String | null) // nullablepassword.clientID(String) // requiredclientID.topicName(String) // requiredtopicName.build();
-
-
Method Detail
-
from
public final ImmutableMQTTOutput.Builder from(MQTTOutput instance)
Fill a builder with attribute values from the providedcom.telenordigital.nbiot.MQTTOutputinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableMQTTOutput.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 ImmutableMQTTOutput.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 ImmutableMQTTOutput.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 ImmutableMQTTOutput.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 ImmutableMQTTOutput.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 ImmutableMQTTOutput.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 ImmutableMQTTOutput.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 ImmutableMQTTOutput.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
-
endpoint
public final ImmutableMQTTOutput.Builder endpoint(String endpoint)
Initializes the value for theendpointattribute.- Parameters:
endpoint- The value for endpoint- Returns:
thisbuilder for use in a chained invocation
-
disableCertCheck
public final ImmutableMQTTOutput.Builder disableCertCheck(@Nullable Boolean disableCertCheck)
Initializes the value for thedisableCertCheckattribute.- Parameters:
disableCertCheck- The value for disableCertCheck (can benull)- Returns:
thisbuilder for use in a chained invocation
-
username
public final ImmutableMQTTOutput.Builder username(@Nullable String username)
Initializes the value for theusernameattribute.- Parameters:
username- The value for username (can benull)- Returns:
thisbuilder for use in a chained invocation
-
password
public final ImmutableMQTTOutput.Builder password(@Nullable String password)
Initializes the value for thepasswordattribute.- Parameters:
password- The value for password (can benull)- Returns:
thisbuilder for use in a chained invocation
-
clientID
public final ImmutableMQTTOutput.Builder clientID(String clientID)
Initializes the value for theclientIDattribute.- Parameters:
clientID- The value for clientID- Returns:
thisbuilder for use in a chained invocation
-
topicName
public final ImmutableMQTTOutput.Builder topicName(String topicName)
Initializes the value for thetopicNameattribute.- Parameters:
topicName- The value for topicName- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableMQTTOutput build()
Builds a newImmutableMQTTOutput.- Returns:
- An immutable instance of MQTTOutput
- Throws:
IllegalStateException- if any required attributes are missing
-
-