Class: Google::Apis::RunV1alpha1::IntOrString
- Inherits:
-
Object
- Object
- Google::Apis::RunV1alpha1::IntOrString
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/run_v1alpha1/classes.rb,
generated/google/apis/run_v1alpha1/representations.rb,
generated/google/apis/run_v1alpha1/representations.rb
Overview
IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.
Instance Attribute Summary collapse
-
#int_val ⇒ Fixnum
The int value.
-
#str_val ⇒ String
The string value.
-
#type ⇒ Fixnum
The type of the value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ IntOrString
constructor
A new instance of IntOrString.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ IntOrString
Returns a new instance of IntOrString.
2023 2024 2025 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 2023 def initialize(**args) update!(**args) end |
Instance Attribute Details
#int_val ⇒ Fixnum
The int value.
Corresponds to the JSON property intVal
2011 2012 2013 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 2011 def int_val @int_val end |
#str_val ⇒ String
The string value.
Corresponds to the JSON property strVal
2016 2017 2018 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 2016 def str_val @str_val end |
#type ⇒ Fixnum
The type of the value.
Corresponds to the JSON property type
2021 2022 2023 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 2021 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2028 2029 2030 2031 2032 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 2028 def update!(**args) @int_val = args[:int_val] if args.key?(:int_val) @str_val = args[:str_val] if args.key?(:str_val) @type = args[:type] if args.key?(:type) end |