Class: Moonbase::Models::Collections::FieldUpdateParams::Field::FieldRelation

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

Defined Under Namespace

Modules: Cardinality, RelationType Classes: AllowedCollection

Instance Attribute Summary collapse

Class Method 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(id: nil, ref: nil, type: :collection) ⇒ Object

A reference to a ‘Collection` used in request bodies. Provide at least one of `id` or `ref` to identify the collection.

Parameters:

  • id (String) (defaults to: nil)

    Unique identifier of the collection.

  • ref (String) (defaults to: nil)

    The stable, machine-readable reference identifier of the collection.

  • type (Symbol, :collection) (defaults to: :collection)

    String representing the object’s type. Always ‘collection` for this object.



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

Instance Attribute Details

#allowed_collectionsArray<Moonbase::Models::Collections::FieldUpdateParams::Field::FieldRelation::AllowedCollection>?

The complete set of allowed collections. Omit to leave unchanged. Array replaces the current set.



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

optional :allowed_collections,
-> { Moonbase::Internal::Type::ArrayOf[Moonbase::Collections::FieldUpdateParams::Field::FieldRelation::AllowedCollection] }

#cardinalitySymbol, ...

Updated cardinality: ‘one` or `many`.



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

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

#default_valuesArray<Moonbase::Models::RelationValueParam, Moonbase::Models::CurrentMember>?



1589
1590
1591
1592
1593
# File 'lib/moonbase/models/collections/field_update_params.rb', line 1589

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

#descriptionString?

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

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#nameString?

The new name for the field.

Returns:

  • (String, nil)


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

optional :name, String

#relation_typeSymbol, ...

The type of relationship: ‘one_way` for simple references, or `two_way` for bidirectional relationships.



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

optional :relation_type,
enum: -> { Moonbase::Collections::FieldUpdateParams::Field::FieldRelation::RelationType }

#requiredBoolean?

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

Returns:

  • (Boolean, nil)


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

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

#typeSymbol, :"field/relation"

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

Returns:

  • (Symbol, :"field/relation")


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

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

#uniqueBoolean?

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

Returns:

  • (Boolean, nil)


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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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