Class ViewInteractionPayload.Builder
java.lang.Object
com.hubspot.slack.client.models.interaction.ViewInteractionPayload.Builder
- Enclosing class:
ViewInteractionPayload
@Generated(from="ViewInteractionPayloadIF",
generator="Immutables")
@NotThreadSafe
public static final class ViewInteractionPayload.Builder
extends Object
Builds instances of type
ViewInteractionPayload.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllBlocks(Iterable<? extends Block> elements) Adds elements toblockslist.Adds one element toblockslist.Adds elements toblockslist.build()Builds a newViewInteractionPayload.from(ViewInteractionPayloadIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.ViewInteractionPayloadIFinstance.from(ViewPayloadBase instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.views.ViewPayloadBaseinstance.Sets or replaces all elements forblockslist.setCallbackId(String callbackId) Initializes the optional valuecallbackIdto callbackId.setCallbackId(Optional<String> callbackId) Initializes the optional valuecallbackIdto callbackId.setExternalId(String externalId) Initializes the optional valueexternalIdto externalId.setExternalId(Optional<String> externalId) Initializes the optional valueexternalIdto externalId.Initializes the value for thehashattribute.setPrivateMetadata(String privateMetadata) Initializes the optional valueprivateMetadatato privateMetadata.setPrivateMetadata(Optional<String> privateMetadata) Initializes the optional valueprivateMetadatato privateMetadata.setState(StateValuesPayload state) Initializes the value for thestateattribute.Initializes the value for thetypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.interaction.ViewInteractionPayloadIFinstance.- 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.views.ViewPayloadBaseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
addBlocks
Adds one element toblockslist.- Parameters:
element- A blocks element- Returns:
thisbuilder for use in a chained invocation
-
addBlocks
Adds elements toblockslist.- Parameters:
elements- An array of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
setBlocks
Sets or replaces all elements forblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBlocks
Adds elements toblockslist.- Parameters:
elements- An iterable of blocks elements- Returns:
thisbuilder for use in a chained invocation
-
setPrivateMetadata
Initializes the optional valueprivateMetadatato privateMetadata.- Parameters:
privateMetadata- The value for privateMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setPrivateMetadata
Initializes the optional valueprivateMetadatato privateMetadata.- Parameters:
privateMetadata- The value for privateMetadata- Returns:
thisbuilder for use in a chained invocation
-
setCallbackId
Initializes the optional valuecallbackIdto callbackId.- Parameters:
callbackId- The value for callbackId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setCallbackId
Initializes the optional valuecallbackIdto callbackId.- Parameters:
callbackId- The value for callbackId- Returns:
thisbuilder for use in a chained invocation
-
setExternalId
Initializes the optional valueexternalIdto externalId.- Parameters:
externalId- The value for externalId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setExternalId
Initializes the optional valueexternalIdto externalId.- Parameters:
externalId- The value for externalId- Returns:
thisbuilder for use in a chained invocation
-
setState
Initializes the value for thestateattribute.- Parameters:
state- The value for state- Returns:
thisbuilder for use in a chained invocation
-
setHash
Initializes the value for thehashattribute.- Parameters:
hash- The value for hash- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newViewInteractionPayload.- Returns:
- An immutable instance of ViewInteractionPayload
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-