Class: Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice
- Defined in:
- lib/moonbase/models/collections/field_create_params.rb
Defined Under Namespace
Modules: Cardinality Classes: Option
Instance Attribute Summary collapse
-
#cardinality ⇒ Symbol, ...
Whether the field holds a single value (‘one`) or multiple values (`many`).
- #default_values ⇒ Array<Moonbase::Models::ChoiceValueParam>?
-
#description ⇒ String?
An optional description of the field’s purpose.
-
#name ⇒ String
The human-readable name for the field.
-
#options ⇒ Array<Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option>
A list of options to create for the field.
-
#required ⇒ Boolean?
If ‘true`, items must have a value for this field.
-
#type ⇒ Symbol, :"field/choice"
The field type.
-
#unique ⇒ Boolean?
If ‘true`, values must be unique across all items.
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
#cardinality ⇒ Symbol, ...
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_values ⇒ Array<Moonbase::Models::ChoiceValueParam>?
1481 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1481 optional :default_values, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::ChoiceValueParam] } |
#description ⇒ String?
An optional description of the field’s purpose.
1487 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1487 optional :description, String |
#name ⇒ String
The human-readable name for the field.
1455 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1455 required :name, String |
#options ⇒ Array<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] } |
#required ⇒ Boolean?
If ‘true`, items must have a value for this field. Defaults to `false`.
1493 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1493 optional :required, Moonbase::Internal::Type::Boolean |
#type ⇒ Symbol, :"field/choice"
The field type. Must be ‘field/choice`.
1468 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1468 required :type, const: :"field/choice" |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1569
|