Class: Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/collections/field_create_params.rb

Defined Under Namespace

Modules: Cardinality Classes: Option

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from Moonbase::Internal::Type::BaseModel

Instance Attribute Details

#cardinalitySymbol, ...

Whether the field holds a single value (‘one`) or multiple values (`many`). Defaults to `one`.



1475
1476
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1475

optional :cardinality,
enum: -> { Moonbase::Collections::FieldCreateParams::Field::FieldChoice::Cardinality }

#default_valuesArray<Moonbase::Models::ChoiceValueParam>?

Returns:



1481
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1481

optional :default_values, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::ChoiceValueParam] }

#descriptionString?

An optional description of the field’s purpose.

Returns:

  • (String, nil)


1487
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1487

optional :description, String

#nameString

The human-readable name for the field.

Returns:

  • (String)


1455
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1455

required :name, String

#optionsArray<Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option>

A list of options to create for the field. Each option must have a ‘name`.



1461
1462
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1461

required :options,
-> { Moonbase::Internal::Type::ArrayOf[Moonbase::Collections::FieldCreateParams::Field::FieldChoice::Option] }

#requiredBoolean?

If ‘true`, items must have a value for this field. Defaults to `false`.

Returns:

  • (Boolean, nil)


1493
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1493

optional :required, Moonbase::Internal::Type::Boolean

#typeSymbol, :"field/choice"

The field type. Must be ‘field/choice`.

Returns:

  • (Symbol, :"field/choice")


1468
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1468

required :type, const: :"field/choice"

#uniqueBoolean?

If ‘true`, values must be unique across all items. Defaults to `false`.

Returns:

  • (Boolean, nil)


1499
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1499

optional :unique, Moonbase::Internal::Type::Boolean

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/moonbase/models/collections/field_create_params.rb', line 1569