class RadioGroupOptionBuilder

declare class RadioGroupOptionBuilder implements JSONEncodable<APIRadioGroupOption>

A builder that creates API-compatible JSON data for radio group options.

Constructors

constructor()

Creates a new radio group option from API data.

Examples:Creating a radio group option from an API data object:
const option = new RadioGroupOptionBuilder({
	label: 'Option 1',
	value: 'option_1',
});
Creating a radio group option using setters and API data:
const option = new RadioGroupOptionBuilder()
	.setLabel('Option 2')
	.setValue('option_2');

setDefault(
isDefault: boolean
) : this

Sets whether this option is selected by default.

setDescription(
description: string
) : this

Sets the description for this option.

setLabel(
label: string
) : this

Sets the label for this option.

setValue(
value: string
) : this

Sets the value for this option.

Serializes this builder to API-compatible JSON data.