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

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

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)


282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/finch_api/models/sandbox/directory_create_params.rb', line 282

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?

Returns:

  • (String, nil)


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

optional :name, String, nil?: true

#valueString, ...

Returns:

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


291
292
293
# File 'lib/finch_api/models/sandbox/directory_create_params.rb', line 291

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