Class RadioButtonGroup
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.RadioButtonGroup
- All Implemented Interfaces:
BlockElement,HasActionId,RadioButtonGroupIF
@Generated(from="RadioButtonGroupIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RadioButtonGroup
extends Object
implements RadioButtonGroupIF
Immutable implementation of
RadioButtonGroupIF.
Use the builder to create immutable instances:
RadioButtonGroup.builder().
Use the static factory method to create immutable instances:
RadioButtonGroup.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.RadioButtonGroupIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RadioButtonGroup.Builderbuilder()Creates a builder forRadioButtonGroup.static RadioButtonGroupcopyOf(RadioButtonGroupIF instance) Creates an immutable copy of aRadioButtonGroupIFvalue.booleanThis instance is equal to all instances ofRadioButtonGroupthat have equal attribute values.getType()inthashCode()Computes a hash code from attributes:type,actionId,options,initialOption,confirmationDialog.static RadioButtonGroupConstruct a new immutableRadioButtonGroupinstance.static RadioButtonGroupConstruct a new immutableRadioButtonGroupinstance.toString()Prints the immutable valueRadioButtonGroupwith attribute values.final RadioButtonGroupwithActionId(String value) Copy the current immutable object by setting a value for theactionIdattribute.final RadioButtonGroupCopy the current immutable object by setting a present value for the optionalconfirmationDialogattribute.final RadioButtonGroupwithConfirmationDialog(Optional<? extends ConfirmationDialog> optional) Copy the current immutable object by setting an optional value for theconfirmationDialogattribute.final RadioButtonGroupwithInitialOption(Option value) Copy the current immutable object by setting a present value for the optionalinitialOptionattribute.final RadioButtonGroupwithInitialOption(Optional<? extends Option> optional) Copy the current immutable object by setting an optional value for theinitialOptionattribute.final RadioButtonGroupwithOptions(Option... elements) Copy the current immutable object with elements that replace the content ofoptions.final RadioButtonGroupwithOptions(Iterable<? extends Option> elements) Copy the current immutable object with elements that replace the content ofoptions.Methods inherited from interface com.hubspot.slack.client.models.blocks.elements.RadioButtonGroupIF
validate
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRadioButtonGroupIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getActionId
- Specified by:
getActionIdin interfaceHasActionId- Specified by:
getActionIdin interfaceRadioButtonGroupIF- Returns:
- The value of the
actionIdattribute
-
getOptions
- Specified by:
getOptionsin interfaceRadioButtonGroupIF- Returns:
- The value of the
optionsattribute
-
getInitialOption
- Specified by:
getInitialOptionin interfaceRadioButtonGroupIF- Returns:
- The value of the
initialOptionattribute
-
getConfirmationDialog
- Specified by:
getConfirmationDialogin interfaceRadioButtonGroupIF- Returns:
- The value of the
confirmationDialogattribute
-
withActionId
Copy the current immutable object by setting a value for theactionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for actionId- Returns:
- A modified copy or the
thisobject
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of options elements to set- Returns:
- A modified copy or
thisif not changed
-
withInitialOption
Copy the current immutable object by setting a present value for the optionalinitialOptionattribute.- Parameters:
value- The value for initialOption,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withInitialOption
Copy the current immutable object by setting an optional value for theinitialOptionattribute. 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 initialOption- Returns:
- A modified copy or
thisif not changed
-
withConfirmationDialog
Copy the current immutable object by setting a present value for the optionalconfirmationDialogattribute.- Parameters:
value- The value for confirmationDialog,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withConfirmationDialog
public final RadioButtonGroup withConfirmationDialog(Optional<? extends ConfirmationDialog> optional) Copy the current immutable object by setting an optional value for theconfirmationDialogattribute. 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 confirmationDialog- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofRadioButtonGroupthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,actionId,options,initialOption,confirmationDialog. -
toString
Prints the immutable valueRadioButtonGroupwith attribute values. -
of
Construct a new immutableRadioButtonGroupinstance.- Parameters:
actionId- The value for theactionIdattributeoptions- The value for theoptionsattribute- Returns:
- An immutable RadioButtonGroup instance
-
of
Construct a new immutableRadioButtonGroupinstance.- Parameters:
actionId- The value for theactionIdattributeoptions- The value for theoptionsattribute- Returns:
- An immutable RadioButtonGroup instance
-
copyOf
Creates an immutable copy of aRadioButtonGroupIFvalue. 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 RadioButtonGroup instance
-
builder
Creates a builder forRadioButtonGroup.RadioButtonGroup.builder() .setActionId(String) // requiredactionId.addOptions|addAllOptions(com.hubspot.slack.client.models.blocks.objects.Option) //optionselements .setInitialOption(Optional<com.hubspot.slack.client.models.blocks.objects.Option>) // optionalinitialOption.setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optionalconfirmationDialog.build();- Returns:
- A new RadioButtonGroup builder
-