Class: CoreLibrary::UnionTypeContext
- Inherits:
-
Object
- Object
- CoreLibrary::UnionTypeContext
- Defined in:
- lib/apimatic-core/types/union_types/union_type_context.rb
Overview
Represents the context for a UnionType
Instance Attribute Summary collapse
-
#date_time_converter ⇒ Object
readonly
Returns the value of attribute date_time_converter.
-
#date_time_format ⇒ Object
readonly
Returns the value of attribute date_time_format.
-
#discriminator ⇒ Object
Returns the value of attribute discriminator.
-
#discriminator_value ⇒ Object
Returns the value of attribute discriminator_value.
-
#is_array ⇒ Object
readonly
Returns the value of attribute is_array.
-
#is_array_of_dict ⇒ Object
readonly
Returns the value of attribute is_array_of_dict.
-
#is_dict ⇒ Object
readonly
Returns the value of attribute is_dict.
-
#is_nested ⇒ Object
Returns the value of attribute is_nested.
-
#is_nullable ⇒ Object
readonly
Returns the value of attribute is_nullable.
-
#is_optional ⇒ Object
readonly
Returns the value of attribute is_optional.
Instance Method Summary collapse
-
#initialize(is_array: false, is_dict: false, is_array_of_dict: false, is_optional: false, is_nullable: false, discriminator: nil, discriminator_value: nil, date_time_format: nil, date_time_converter: nil) ⇒ UnionTypeContext
constructor
Initializes a new instance of UnionTypeContext.
-
#nullable_or_optional? ⇒ Boolean
Determines if the UnionTypeContext is nullable or optional.
Constructor Details
#initialize(is_array: false, is_dict: false, is_array_of_dict: false, is_optional: false, is_nullable: false, discriminator: nil, discriminator_value: nil, date_time_format: nil, date_time_converter: nil) ⇒ UnionTypeContext
Initializes a new instance of UnionTypeContext
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 10 def initialize(is_array: false, is_dict: false, is_array_of_dict: false, is_optional: false, is_nullable: false, discriminator: nil, discriminator_value: nil, date_time_format: nil, date_time_converter: nil) @is_array = is_array @is_dict = is_dict @is_array_of_dict = is_array_of_dict @is_optional = is_optional @is_nullable = is_nullable @discriminator = discriminator @discriminator_value = discriminator_value @date_time_format = date_time_format @date_time_converter = date_time_converter @is_nested = false end |
Instance Attribute Details
#date_time_converter ⇒ Object (readonly)
Returns the value of attribute date_time_converter.
4 5 6 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 4 def date_time_converter @date_time_converter end |
#date_time_format ⇒ Object (readonly)
Returns the value of attribute date_time_format.
4 5 6 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 4 def date_time_format @date_time_format end |
#discriminator ⇒ Object
Returns the value of attribute discriminator.
7 8 9 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 7 def discriminator @discriminator end |
#discriminator_value ⇒ Object
Returns the value of attribute discriminator_value.
7 8 9 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 7 def discriminator_value @discriminator_value end |
#is_array ⇒ Object (readonly)
Returns the value of attribute is_array.
4 5 6 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 4 def is_array @is_array end |
#is_array_of_dict ⇒ Object (readonly)
Returns the value of attribute is_array_of_dict.
4 5 6 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 4 def is_array_of_dict @is_array_of_dict end |
#is_dict ⇒ Object (readonly)
Returns the value of attribute is_dict.
4 5 6 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 4 def is_dict @is_dict end |
#is_nested ⇒ Object
Returns the value of attribute is_nested.
7 8 9 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 7 def is_nested @is_nested end |
#is_nullable ⇒ Object (readonly)
Returns the value of attribute is_nullable.
4 5 6 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 4 def is_nullable @is_nullable end |
#is_optional ⇒ Object (readonly)
Returns the value of attribute is_optional.
4 5 6 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 4 def is_optional @is_optional end |
Instance Method Details
#nullable_or_optional? ⇒ Boolean
Determines if the UnionTypeContext is nullable or optional
26 27 28 |
# File 'lib/apimatic-core/types/union_types/union_type_context.rb', line 26 def nullable_or_optional? @is_nullable || @is_optional end |