Class: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::CustomField

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/finch_api/models/sandbox/directory_create_params.rb,
sig/finch_api/models/sandbox/directory_create_params.rbs

Defined Under Namespace

Modules: Value

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(name: nil, value: nil) ⇒ Object

Parameters:

  • name (String, nil) (defaults to: nil)
  • value (String, Array<Object>, Object, Float, Boolean, nil) (defaults to: nil)


328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# File 'lib/finch_api/models/sandbox/directory_create_params.rb', line 328

class CustomField < FinchAPI::Internal::Type::BaseModel
  # @!attribute name
  #
  #   @return [String, nil]
  optional :name, String, nil?: true

  # @!attribute value
  #
  #   @return [String, Array<Object>, Object, Float, Boolean, nil]
  optional :value,
           union: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::CustomField::Value },
           nil?: true

  # @!method initialize(name: nil, value: nil)
  #   @param name [String, nil]
  #   @param value [String, Array<Object>, Object, Float, Boolean, nil]

  # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::CustomField#value
  module Value
    extend FinchAPI::Internal::Type::Union

    variant String

    variant -> { FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::CustomField::Value::UnionMember1Array }

    variant FinchAPI::Internal::Type::Unknown

    variant Float

    variant FinchAPI::Internal::Type::Boolean

    # @!method self.variants
    #   @return [Array(String, Array<Object>, Object, Float, Boolean)]

    # @type [FinchAPI::Internal::Type::Converter]
    UnionMember1Array = FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown]
  end
end

Instance Attribute Details

#nameString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


332
# File 'lib/finch_api/models/sandbox/directory_create_params.rb', line 332

optional :name, String, nil?: true

#valueString, ...

Parameters:

  • value (FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::CustomField::value, nil)

Returns:

  • (String, Array<Object>, Object, Float, Boolean, nil)


337
338
339
# File 'lib/finch_api/models/sandbox/directory_create_params.rb', line 337

optional :value,
union: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::CustomField::Value },
nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


220
# File 'sig/finch_api/models/sandbox/directory_create_params.rbs', line 220

def to_hash: -> {