Class ViewInteractionPayload
java.lang.Object
com.hubspot.slack.client.models.interaction.ViewInteractionPayload
- All Implemented Interfaces:
ViewInteractionPayloadIF,ViewPayloadBase
@Generated(from="ViewInteractionPayloadIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ViewInteractionPayload
extends Object
implements ViewInteractionPayloadIF
Immutable implementation of
ViewInteractionPayloadIF.
Use the builder to create immutable instances:
ViewInteractionPayload.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeViewInteractionPayload. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forViewInteractionPayload.static ViewInteractionPayloadcopyOf(ViewInteractionPayloadIF instance) Creates an immutable copy of aViewInteractionPayloadIFvalue.booleanThis instance is equal to all instances ofViewInteractionPayloadthat have equal attribute values.getHash()getState()getType()inthashCode()Computes a hash code from attributes:type,blocks,privateMetadata,callbackId,externalId,state,hash.toString()Prints the immutable valueViewInteractionPayloadwith attribute values.final ViewInteractionPayloadwithBlocks(Block... elements) Copy the current immutable object with elements that replace the content ofblocks.final ViewInteractionPayloadwithBlocks(Iterable<? extends Block> elements) Copy the current immutable object with elements that replace the content ofblocks.final ViewInteractionPayloadwithCallbackId(String value) Copy the current immutable object by setting a present value for the optionalcallbackIdattribute.final ViewInteractionPayloadwithCallbackId(Optional<String> optional) Copy the current immutable object by setting an optional value for thecallbackIdattribute.final ViewInteractionPayloadwithExternalId(String value) Copy the current immutable object by setting a present value for the optionalexternalIdattribute.final ViewInteractionPayloadwithExternalId(Optional<String> optional) Copy the current immutable object by setting an optional value for theexternalIdattribute.final ViewInteractionPayloadCopy the current immutable object by setting a value for thehashattribute.final ViewInteractionPayloadwithPrivateMetadata(String value) Copy the current immutable object by setting a present value for the optionalprivateMetadataattribute.final ViewInteractionPayloadwithPrivateMetadata(Optional<String> optional) Copy the current immutable object by setting an optional value for theprivateMetadataattribute.final ViewInteractionPayloadwithState(StateValuesPayload value) Copy the current immutable object by setting a value for thestateattribute.final ViewInteractionPayloadCopy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceViewPayloadBase- Returns:
- The value of the
typeattribute
-
getBlocks
- Specified by:
getBlocksin interfaceViewPayloadBase- Returns:
- The value of the
blocksattribute
-
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
-
getState
- Specified by:
getStatein interfaceViewInteractionPayloadIF- Returns:
- The value of the
stateattribute
-
getHash
- Specified by:
getHashin interfaceViewInteractionPayloadIF- Returns:
- The value of the
hashattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- 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
-
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
-
withState
Copy the current immutable object by setting a value for thestateattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state- Returns:
- A modified copy or the
thisobject
-
withHash
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofViewInteractionPayloadthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,blocks,privateMetadata,callbackId,externalId,state,hash. -
toString
Prints the immutable valueViewInteractionPayloadwith attribute values. -
copyOf
Creates an immutable copy of aViewInteractionPayloadIFvalue. 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 ViewInteractionPayload instance
-
builder
Creates a builder forViewInteractionPayload.ViewInteractionPayload.builder() .setType(String) // requiredtype.addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) //blockselements .setPrivateMetadata(Optional<String>) // optionalprivateMetadata.setCallbackId(Optional<String>) // optionalcallbackId.setExternalId(Optional<String>) // optionalexternalId.setState(com.hubspot.slack.client.models.interaction.StateValuesPayload) // requiredstate.setHash(String) // requiredhash.build();- Returns:
- A new ViewInteractionPayload builder
-