Class: Moonbase::Models::Collections::FieldUpdateParams::Field::FieldBoolean

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

Defined Under Namespace

Modules: Cardinality

Instance Attribute Summary collapse

Instance Method Summary collapse

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(cardinality: nil, default_values: nil, description: nil, name: nil, required: nil, unique: nil, type: :"field/boolean") ⇒ Object

Parameters for updating a boolean field.

Parameters:

  • cardinality (Symbol, Moonbase::Models::Collections::FieldUpdateParams::Field::FieldBoolean::Cardinality) (defaults to: nil)

    Updated cardinality: ‘one` or `many`.

  • default_values (Array<Moonbase::Models::BooleanValue>, nil) (defaults to: nil)
  • description (String, nil) (defaults to: nil)

    An updated description, or ‘null` to clear it.

  • name (String) (defaults to: nil)

    The new name for the field.

  • required (Boolean) (defaults to: nil)

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

  • unique (Boolean) (defaults to: nil)

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

  • type (Symbol, :"field/boolean") (defaults to: :"field/boolean")

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



# File 'lib/moonbase/models/collections/field_update_params.rb', line 695

Instance Attribute Details

#cardinalitySymbol, ...

Updated cardinality: ‘one` or `many`.



659
660
# File 'lib/moonbase/models/collections/field_update_params.rb', line 659

optional :cardinality,
enum: -> { Moonbase::Collections::FieldUpdateParams::Field::FieldBoolean::Cardinality }

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

Returns:



665
666
667
668
669
# File 'lib/moonbase/models/collections/field_update_params.rb', line 665

optional :default_values,
-> {
  Moonbase::Internal::Type::ArrayOf[Moonbase::BooleanValue]
},
nil?: true

#descriptionString?

An updated description, or ‘null` to clear it.

Returns:

  • (String, nil)


675
# File 'lib/moonbase/models/collections/field_update_params.rb', line 675

optional :description, String, nil?: true

#nameString?

The new name for the field.

Returns:

  • (String, nil)


681
# File 'lib/moonbase/models/collections/field_update_params.rb', line 681

optional :name, String

#requiredBoolean?

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

Returns:

  • (Boolean, nil)


687
# File 'lib/moonbase/models/collections/field_update_params.rb', line 687

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

#typeSymbol, :"field/boolean"

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

Returns:

  • (Symbol, :"field/boolean")


653
# File 'lib/moonbase/models/collections/field_update_params.rb', line 653

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

#uniqueBoolean?

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

Returns:

  • (Boolean, nil)


693
# File 'lib/moonbase/models/collections/field_update_params.rb', line 693

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