Class: Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option
- Defined in:
- lib/moonbase/models/collections/field_create_params.rb
Defined Under Namespace
Modules: Color
Instance Attribute Summary collapse
-
#color ⇒ Symbol, Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option::Color
The color of the option.
-
#name ⇒ String
The display name of the option.
Instance Method Summary collapse
-
#initialize(color:, name:) ⇒ Object
constructor
Parameters for defining an option in a choice field.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, 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
#initialize(color:, name:) ⇒ Object
Parameters for defining an option in a choice field.
1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1524 class Option < Moonbase::Internal::Type::BaseModel # @!attribute color # The color of the option. # # @return [Symbol, Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option::Color] required :color, enum: -> { Moonbase::Collections::FieldCreateParams::Field::FieldChoice::Option::Color } # @!attribute name # The display name of the option. # # @return [String] required :name, String # @!method initialize(color:, name:) # Parameters for defining an option in a choice field. # # @param color [Symbol, Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option::Color] The color of the option. # # @param name [String] The display name of the option. # The color of the option. # # @see Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option#color module Color extend Moonbase::Internal::Type::Enum AMBER = :amber BLUE = :blue CYAN = :cyan EMERALD = :emerald FUCHSIA = :fuchsia GREEN = :green INDIGO = :indigo LIME = :lime LUNAR = :lunar ORANGE = :orange PINK = :pink PURPLE = :purple RED = :red ROSE = :rose SKY = :sky TEAL = :teal VIOLET = :violet YELLOW = :yellow # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#color ⇒ Symbol, Moonbase::Models::Collections::FieldCreateParams::Field::FieldChoice::Option::Color
The color of the option.
1529 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1529 required :color, enum: -> { Moonbase::Collections::FieldCreateParams::Field::FieldChoice::Option::Color } |
#name ⇒ String
The display name of the option.
1535 |
# File 'lib/moonbase/models/collections/field_create_params.rb', line 1535 required :name, String |