Class: SafetyKit::Models::ContentCreateParams::Content::UnionMember1

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/safety_kit/models/content_create_params.rb,
sig/safety_kit/models/content_create_params.rbs

Defined Under Namespace

Modules: Type Classes: Source

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(source:, type:, key: nil) ⇒ Object

Parameters:



# File 'lib/safety_kit/models/content_create_params.rb', line 120

Instance Attribute Details

#keyString?

Your name for where this part came from.

Parameters:

  • (String)

Returns:

  • (String, nil)


118
# File 'lib/safety_kit/models/content_create_params.rb', line 118

optional :key, String

#sourceSafetyKit::Models::ContentCreateParams::Content::UnionMember1::Source

Parameters:

  • value (SafetyKit::ContentCreateParams::Content::UnionMember1::Source)

Returns:



107
# File 'lib/safety_kit/models/content_create_params.rb', line 107

required :source, -> { SafetyKit::ContentCreateParams::Content::UnionMember1::Source }

#typeSymbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Type

Parameters:

  • value (SafetyKit::Models::ContentCreateParams::Content::UnionMember1::type_)

Returns:



112
# File 'lib/safety_kit/models/content_create_params.rb', line 112

required :type, enum: -> { SafetyKit::ContentCreateParams::Content::UnionMember1::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/safety_kit/models/content_create_params.rb', line 151

Instance Method Details

#to_hash{

Returns:

  • ({)


121
# File 'sig/safety_kit/models/content_create_params.rbs', line 121

def to_hash: -> {