Package com.telenordigital.nbiot
Class ImmutableWebHookOutput.Builder
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableWebHookOutput.Builder
-
- Enclosing class:
- ImmutableWebHookOutput
@NotThreadSafe public static final class ImmutableWebHookOutput.Builder extends Object
Builds instances of typeImmutableWebHookOutput. 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 forImmutableWebHookOutputinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableWebHookOutput.BuilderbasicAuthPass(String basicAuthPass)Initializes the value for thebasicAuthPassattribute.ImmutableWebHookOutput.BuilderbasicAuthUser(String basicAuthUser)Initializes the value for thebasicAuthUserattribute.ImmutableWebHookOutputbuild()Builds a newImmutableWebHookOutput.ImmutableWebHookOutput.BuildercollectionID(String collectionID)Initializes the value for thecollectionIDattribute.ImmutableWebHookOutput.BuildercustomHeaderName(String customHeaderName)Initializes the value for thecustomHeaderNameattribute.ImmutableWebHookOutput.BuildercustomHeaderValue(String customHeaderValue)Initializes the value for thecustomHeaderValueattribute.ImmutableWebHookOutput.Builderenabled(Boolean enabled)Initializes the value for theenabledattribute.ImmutableWebHookOutput.Builderfrom(Output instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.Outputinstance.ImmutableWebHookOutput.Builderfrom(WebHookOutput instance)Fill a builder with attribute values from the providedcom.telenordigital.nbiot.WebHookOutputinstance.ImmutableWebHookOutput.Builderid(String id)Initializes the value for theidattribute.ImmutableWebHookOutput.BuilderputAllTags(Map<String,? extends String> entries)Put all mappings from the specified map as entries totagsmap.ImmutableWebHookOutput.BuilderputTags(String key, String value)Put one entry to thetagsmap.ImmutableWebHookOutput.BuilderputTags(Map.Entry<String,? extends String> entry)Put one entry to thetagsmap.ImmutableWebHookOutput.Buildertags(Map<String,? extends String> entries)Sets or replaces all mappings from the specified map as entries for thetagsmap.ImmutableWebHookOutput.Builderurl(String url)Initializes the value for theurlattribute.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forImmutableWebHookOutputinstances.new ImmutableWebHookOutput.Builder() .id(String | null) // nullableid.collectionID(String | null) // nullablecollectionID.enabled(Boolean | null) // nullableenabled.tags(Map<String, String> | null) // nullabletags.url(String) // requiredurl.basicAuthUser(String | null) // nullablebasicAuthUser.basicAuthPass(String | null) // nullablebasicAuthPass.customHeaderName(String | null) // nullablecustomHeaderName.customHeaderValue(String | null) // nullablecustomHeaderValue.build();
-
-
Method Detail
-
from
public final ImmutableWebHookOutput.Builder from(WebHookOutput instance)
Fill a builder with attribute values from the providedcom.telenordigital.nbiot.WebHookOutputinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableWebHookOutput.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 ImmutableWebHookOutput.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 ImmutableWebHookOutput.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 ImmutableWebHookOutput.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 ImmutableWebHookOutput.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 ImmutableWebHookOutput.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 ImmutableWebHookOutput.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 ImmutableWebHookOutput.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
-
url
public final ImmutableWebHookOutput.Builder url(String url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url- Returns:
thisbuilder for use in a chained invocation
-
basicAuthUser
public final ImmutableWebHookOutput.Builder basicAuthUser(@Nullable String basicAuthUser)
Initializes the value for thebasicAuthUserattribute.- Parameters:
basicAuthUser- The value for basicAuthUser (can benull)- Returns:
thisbuilder for use in a chained invocation
-
basicAuthPass
public final ImmutableWebHookOutput.Builder basicAuthPass(@Nullable String basicAuthPass)
Initializes the value for thebasicAuthPassattribute.- Parameters:
basicAuthPass- The value for basicAuthPass (can benull)- Returns:
thisbuilder for use in a chained invocation
-
customHeaderName
public final ImmutableWebHookOutput.Builder customHeaderName(@Nullable String customHeaderName)
Initializes the value for thecustomHeaderNameattribute.- Parameters:
customHeaderName- The value for customHeaderName (can benull)- Returns:
thisbuilder for use in a chained invocation
-
customHeaderValue
public final ImmutableWebHookOutput.Builder customHeaderValue(@Nullable String customHeaderValue)
Initializes the value for thecustomHeaderValueattribute.- Parameters:
customHeaderValue- The value for customHeaderValue (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableWebHookOutput build()
Builds a newImmutableWebHookOutput.- Returns:
- An immutable instance of WebHookOutput
- Throws:
IllegalStateException- if any required attributes are missing
-
-