Class Context.Builder
java.lang.Object
com.hubspot.slack.client.models.blocks.Context.Builder
- Enclosing class:
Context
@Generated(from="ContextIF",
generator="Immutables")
@NotThreadSafe
public static final class Context.Builder
extends Object
-
Method Summary
Modifier and TypeMethodDescriptionfinal Context.BuilderaddAllElements(Iterable<? extends ImageBlockOrText> elements) Adds elements toelementslist.final Context.BuilderaddElements(ImageBlockOrText element) Adds one element toelementslist.final Context.BuilderaddElements(ImageBlockOrText... elements) Adds elements toelementslist.build()Builds a newContext.final Context.BuilderFill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.Blockinstance.final Context.BuilderFill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.ContextIFinstance.final Context.BuildersetBlockId(String blockId) Initializes the optional valueblockIdto blockId.final Context.BuildersetBlockId(Optional<String> blockId) Initializes the optional valueblockIdto blockId.final Context.BuildersetElements(Iterable<? extends ImageBlockOrText> elements) Sets or replaces all elements forelementslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.Blockinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.blocks.ContextIFinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setBlockId
Initializes the optional valueblockIdto blockId.- Parameters:
blockId- The value for blockId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setBlockId
Initializes the optional valueblockIdto blockId.- Parameters:
blockId- The value for blockId- Returns:
thisbuilder for use in a chained invocation
-
addElements
Adds one element toelementslist.- Parameters:
element- A elements element- Returns:
thisbuilder for use in a chained invocation
-
addElements
Adds elements toelementslist.- Parameters:
elements- An array of elements elements- Returns:
thisbuilder for use in a chained invocation
-
setElements
Sets or replaces all elements forelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
addAllElements
Adds elements toelementslist.- Parameters:
elements- An iterable of elements elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newContext.- Returns:
- An immutable instance of Context
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-