Class OptionGroup
java.lang.Object
com.hubspot.slack.client.models.blocks.objects.OptionGroup
- All Implemented Interfaces:
CompositionObject,OptionGroupIF,OptionOrOptionGroup
@Generated(from="OptionGroupIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class OptionGroup
extends Object
implements OptionGroupIF
Immutable implementation of
OptionGroupIF.
Use the builder to create immutable instances:
OptionGroup.builder().
Use the static factory method to create immutable instances:
OptionGroup.of().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionGroup.Builderbuilder()Creates a builder forOptionGroup.static OptionGroupcopyOf(OptionGroupIF instance) Creates an immutable copy of aOptionGroupIFvalue.booleanThis instance is equal to all instances ofOptionGroupthat have equal attribute values.getLabel()inthashCode()Computes a hash code from attributes:label,options.static OptionGroupConstruct a new immutableOptionGroupinstance.static OptionGroupConstruct a new immutableOptionGroupinstance.toString()Prints the immutable valueOptionGroupwith attribute values.final OptionGroupCopy the current immutable object by setting a value for thelabelattribute.final OptionGroupwithOptions(Option... elements) Copy the current immutable object with elements that replace the content ofoptions.final OptionGroupwithOptions(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.objects.OptionGroupIF
validate
-
Method Details
-
getLabel
- Specified by:
getLabelin interfaceOptionGroupIF- Returns:
- The value of the
labelattribute
-
getOptions
- Specified by:
getOptionsin interfaceOptionGroupIF- Returns:
- The value of the
optionsattribute
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- 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
-
equals
This instance is equal to all instances ofOptionGroupthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:label,options. -
toString
Prints the immutable valueOptionGroupwith attribute values. -
of
Construct a new immutableOptionGroupinstance.- Parameters:
label- The value for thelabelattributeoptions- The value for theoptionsattribute- Returns:
- An immutable OptionGroup instance
-
of
Construct a new immutableOptionGroupinstance.- Parameters:
label- The value for thelabelattributeoptions- The value for theoptionsattribute- Returns:
- An immutable OptionGroup instance
-
copyOf
Creates an immutable copy of aOptionGroupIFvalue. 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 OptionGroup instance
-
builder
Creates a builder forOptionGroup.OptionGroup.builder() .setLabel(com.hubspot.slack.client.models.blocks.objects.Text) // requiredlabel.addOptions|addAllOptions(Option) //optionselements .build();- Returns:
- A new OptionGroup builder
-