class RadioGroupOptionBuilder
implements
JSONEncodable<APIRadioGroupOption>declare class RadioGroupOptionBuilder implements JSONEncodable<APIRadioGroupOption>A builder that creates API-compatible JSON data for radio group options.
Constructors
constructor(data?: Partial<APIRadioGroupOption>)
data?: Partial<APIRadioGroupOption>
Creates a new radio group option from API data.
Examples:Creating a radio group option from an API data object:Creating a radio group option using setters and API data:
const option = new RadioGroupOptionBuilder({
label: 'Option 1',
value: 'option_1',
});const option = new RadioGroupOptionBuilder()
.setLabel('Option 2')
.setValue('option_2');data : Partial<APIRadioGroupOption>
setDefault(isDefault: boolean) : this
isDefault: boolean
Sets whether this option is selected by default.
setDescription(description: string) : this
description: string
Sets the description for this option.
setLabel(label: string) : this
label: string
Sets the label for this option.
setValue(value: string) : this
value: string
Sets the value for this option.
toJSON() : APIRadioGroupOption
Serializes this builder to API-compatible JSON data.