Class ModalViewPayload
java.lang.Object
com.hubspot.slack.client.models.views.ModalViewPayload
- All Implemented Interfaces:
ModalViewPayloadBase,ModalViewPayloadIF,ViewPayloadBase,ViewPayloadJsonBase
@Generated(from="ModalViewPayloadIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ModalViewPayload
extends Object
implements ModalViewPayloadIF
Immutable implementation of
ModalViewPayloadIF.
Use the builder to create immutable instances:
ModalViewPayload.builder().
Use the static factory method to create immutable instances:
ModalViewPayload.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.views.ModalViewPayloadBase
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic ModalViewPayload.Builderbuilder()Creates a builder forModalViewPayload.static ModalViewPayloadcopyOf(ModalViewPayloadIF instance) Creates an immutable copy of aModalViewPayloadIFvalue.booleanThis instance is equal to all instances ofModalViewPayloadthat have equal attribute values.getTitle()getType()inthashCode()Computes a hash code from attributes:privateMetadata,callbackId,externalId,type,closeButtonText,submitButtonText,clearOnClose,notifyOnClose,title,blocks.static ModalViewPayloadConstruct a new immutableModalViewPayloadinstance.static ModalViewPayloadConstruct a new immutableModalViewPayloadinstance.toString()Prints the immutable valueModalViewPayloadwith attribute values.final ModalViewPayloadwithBlocks(Block... elements) Copy the current immutable object with elements that replace the content ofblocks.final ModalViewPayloadwithBlocks(Iterable<? extends Block> elements) Copy the current immutable object with elements that replace the content ofblocks.final ModalViewPayloadwithCallbackId(String value) Copy the current immutable object by setting a present value for the optionalcallbackIdattribute.final ModalViewPayloadwithCallbackId(Optional<String> optional) Copy the current immutable object by setting an optional value for thecallbackIdattribute.final ModalViewPayloadwithClearOnClose(Boolean value) Copy the current immutable object by setting a present value for the optionalclearOnCloseattribute.final ModalViewPayloadwithClearOnClose(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theclearOnCloseattribute.final ModalViewPayloadwithCloseButtonText(Text value) Copy the current immutable object by setting a present value for the optionalcloseButtonTextattribute.final ModalViewPayloadwithCloseButtonText(Optional<? extends Text> optional) Copy the current immutable object by setting an optional value for thecloseButtonTextattribute.final ModalViewPayloadwithExternalId(String value) Copy the current immutable object by setting a present value for the optionalexternalIdattribute.final ModalViewPayloadwithExternalId(Optional<String> optional) Copy the current immutable object by setting an optional value for theexternalIdattribute.final ModalViewPayloadwithNotifyOnClose(Boolean value) Copy the current immutable object by setting a present value for the optionalnotifyOnCloseattribute.final ModalViewPayloadwithNotifyOnClose(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thenotifyOnCloseattribute.final ModalViewPayloadwithPrivateMetadata(String value) Copy the current immutable object by setting a present value for the optionalprivateMetadataattribute.final ModalViewPayloadwithPrivateMetadata(Optional<String> optional) Copy the current immutable object by setting an optional value for theprivateMetadataattribute.final ModalViewPayloadwithSubmitButtonText(Text value) Copy the current immutable object by setting a present value for the optionalsubmitButtonTextattribute.final ModalViewPayloadwithSubmitButtonText(Optional<? extends Text> optional) Copy the current immutable object by setting an optional value for thesubmitButtonTextattribute.final ModalViewPayloadCopy the current immutable object by setting a value for thetitleattribute.
-
Method Details
-
getPrivateMetadata
- Specified by:
getPrivateMetadatain interfaceViewPayloadBase- Returns:
- The value of the
privateMetadataattribute
-
getCallbackId
- Specified by:
getCallbackIdin interfaceViewPayloadBase- Returns:
- The value of the
callbackIdattribute
-
getExternalId
- Specified by:
getExternalIdin interfaceViewPayloadBase- Returns:
- The value of the
externalIdattribute
-
getType
- Specified by:
getTypein interfaceModalViewPayloadBase- Specified by:
getTypein interfaceViewPayloadBase- Returns:
- The computed-at-construction value of the
typeattribute
-
getCloseButtonText
- Specified by:
getCloseButtonTextin interfaceModalViewPayloadBase- Returns:
- The value of the
closeButtonTextattribute
-
getSubmitButtonText
- Specified by:
getSubmitButtonTextin interfaceModalViewPayloadBase- Returns:
- The value of the
submitButtonTextattribute
-
getClearOnClose
- Specified by:
getClearOnClosein interfaceModalViewPayloadBase- Returns:
- The value of the
clearOnCloseattribute
-
getNotifyOnClose
- Specified by:
getNotifyOnClosein interfaceModalViewPayloadBase- Returns:
- The value of the
notifyOnCloseattribute
-
getTitle
- Specified by:
getTitlein interfaceModalViewPayloadBase- Specified by:
getTitlein interfaceModalViewPayloadIF- Returns:
- The value of the
titleattribute
-
getBlocks
- Specified by:
getBlocksin interfaceModalViewPayloadIF- Specified by:
getBlocksin interfaceViewPayloadBase- Returns:
- The value of the
blocksattribute
-
withPrivateMetadata
Copy the current immutable object by setting a present value for the optionalprivateMetadataattribute.- Parameters:
value- The value for privateMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withPrivateMetadata
Copy the current immutable object by setting an optional value for theprivateMetadataattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for privateMetadata- Returns:
- A modified copy or
thisif not changed
-
withCallbackId
Copy the current immutable object by setting a present value for the optionalcallbackIdattribute.- Parameters:
value- The value for callbackId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withCallbackId
Copy the current immutable object by setting an optional value for thecallbackIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for callbackId- Returns:
- A modified copy or
thisif not changed
-
withExternalId
Copy the current immutable object by setting a present value for the optionalexternalIdattribute.- Parameters:
value- The value for externalId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withExternalId
Copy the current immutable object by setting an optional value for theexternalIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for externalId- Returns:
- A modified copy or
thisif not changed
-
withCloseButtonText
Copy the current immutable object by setting a present value for the optionalcloseButtonTextattribute.- Parameters:
value- The value for closeButtonText,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withCloseButtonText
Copy the current immutable object by setting an optional value for thecloseButtonTextattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for closeButtonText- Returns:
- A modified copy or
thisif not changed
-
withSubmitButtonText
Copy the current immutable object by setting a present value for the optionalsubmitButtonTextattribute.- Parameters:
value- The value for submitButtonText,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withSubmitButtonText
Copy the current immutable object by setting an optional value for thesubmitButtonTextattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for submitButtonText- Returns:
- A modified copy or
thisif not changed
-
withClearOnClose
Copy the current immutable object by setting a present value for the optionalclearOnCloseattribute.- Parameters:
value- The value for clearOnClose,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withClearOnClose
Copy the current immutable object by setting an optional value for theclearOnCloseattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for clearOnClose- Returns:
- A modified copy or
thisif not changed
-
withNotifyOnClose
Copy the current immutable object by setting a present value for the optionalnotifyOnCloseattribute.- Parameters:
value- The value for notifyOnClose,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withNotifyOnClose
Copy the current immutable object by setting an optional value for thenotifyOnCloseattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for notifyOnClose- Returns:
- A modified copy or
thisif not changed
-
withTitle
Copy the current immutable object by setting a value for thetitleattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title- Returns:
- A modified copy or the
thisobject
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of blocks elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofModalViewPayloadthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:privateMetadata,callbackId,externalId,type,closeButtonText,submitButtonText,clearOnClose,notifyOnClose,title,blocks. -
toString
Prints the immutable valueModalViewPayloadwith attribute values. -
of
Construct a new immutableModalViewPayloadinstance.- Parameters:
title- The value for thetitleattributeblocks- The value for theblocksattribute- Returns:
- An immutable ModalViewPayload instance
-
of
Construct a new immutableModalViewPayloadinstance.- Parameters:
title- The value for thetitleattributeblocks- The value for theblocksattribute- Returns:
- An immutable ModalViewPayload instance
-
copyOf
Creates an immutable copy of aModalViewPayloadIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ModalViewPayload instance
-
builder
Creates a builder forModalViewPayload.ModalViewPayload.builder() .setPrivateMetadata(Optional<String>) // optionalprivateMetadata.setCallbackId(Optional<String>) // optionalcallbackId.setExternalId(Optional<String>) // optionalexternalId.setCloseButtonText(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optionalcloseButtonText.setSubmitButtonText(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optionalsubmitButtonText.setClearOnClose(Optional<Boolean>) // optionalclearOnClose.setNotifyOnClose(Optional<Boolean>) // optionalnotifyOnClose.setTitle(com.hubspot.slack.client.models.blocks.objects.Text) // requiredtitle.addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) //blockselements .build();- Returns:
- A new ModalViewPayload builder
-