Package com.telenordigital.nbiot
Class ImmutableIFTTTOutput.Builder
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableIFTTTOutput.Builder
-
- Enclosing class:
- ImmutableIFTTTOutput
@NotThreadSafe public static final class ImmutableIFTTTOutput.Builder extends Object
Builds instances of typeImmutableIFTTTOutput. 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 forImmutableIFTTTOutputinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableIFTTTOutput.BuilderasIsPayload(Boolean asIsPayload)Initializes the value for theasIsPayloadattribute.ImmutableIFTTTOutputbuild()Builds a newImmutableIFTTTOutput.ImmutableIFTTTOutput.BuildercollectionID(String collectionID)Initializes the value for thecollectionIDattribute.ImmutableIFTTTOutput.Builderenabled(Boolean enabled)Initializes the value for theenabledattribute.ImmutableIFTTTOutput.BuildereventName(String eventName)Initializes the value for theeventNameattribute.ImmutableIFTTTOutput.Builderfrom(IFTTTOutput instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.IFTTTOutputinstance.ImmutableIFTTTOutput.Builderfrom(Output instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.Outputinstance.ImmutableIFTTTOutput.Builderid(String id)Initializes the value for theidattribute.ImmutableIFTTTOutput.Builderkey(String key)Initializes the value for thekeyattribute.ImmutableIFTTTOutput.BuilderputAllTags(Map<String,? extends String> entries)Put all mappings from the specified map as entries totagsmap.ImmutableIFTTTOutput.BuilderputTags(String key, String value)Put one entry to thetagsmap.ImmutableIFTTTOutput.BuilderputTags(Map.Entry<String,? extends String> entry)Put one entry to thetagsmap.ImmutableIFTTTOutput.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 forImmutableIFTTTOutputinstances.new ImmutableIFTTTOutput.Builder() .id(String | null) // nullableid.collectionID(String | null) // nullablecollectionID.enabled(Boolean | null) // nullableenabled.tags(Map<String, String> | null) // nullabletags.key(String) // requiredkey.eventName(String) // requiredeventName.asIsPayload(Boolean | null) // nullableasIsPayload.build();
-
-
Method Detail
-
from
public final ImmutableIFTTTOutput.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
-
from
public final ImmutableIFTTTOutput.Builder from(IFTTTOutput instance)
Fill a builder with attribute values from the providedcom.telenordigital.nbiot.IFTTTOutputinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
public final ImmutableIFTTTOutput.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 ImmutableIFTTTOutput.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 ImmutableIFTTTOutput.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 ImmutableIFTTTOutput.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 ImmutableIFTTTOutput.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 ImmutableIFTTTOutput.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 ImmutableIFTTTOutput.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
-
key
public final ImmutableIFTTTOutput.Builder key(String key)
Initializes the value for thekeyattribute.- Parameters:
key- The value for key- Returns:
thisbuilder for use in a chained invocation
-
eventName
public final ImmutableIFTTTOutput.Builder eventName(String eventName)
Initializes the value for theeventNameattribute.- Parameters:
eventName- The value for eventName- Returns:
thisbuilder for use in a chained invocation
-
asIsPayload
public final ImmutableIFTTTOutput.Builder asIsPayload(@Nullable Boolean asIsPayload)
Initializes the value for theasIsPayloadattribute.- Parameters:
asIsPayload- The value for asIsPayload (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableIFTTTOutput build()
Builds a newImmutableIFTTTOutput.- Returns:
- An immutable instance of IFTTTOutput
- Throws:
IllegalStateException- if any required attributes are missing
-
-