Class: Cadenya::Types::AgentVariation
- Inherits:
-
Object
- Object
- Cadenya::Types::AgentVariation
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, info: nil) ⇒ AgentVariation
constructor
A new instance of AgentVariation.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil) ⇒ AgentVariation
Returns a new instance of AgentVariation.
612 613 614 615 616 |
# File 'lib/cadenya/types.rb', line 612 def initialize(metadata: nil, spec: nil, info: nil) @metadata = @spec = spec @info = info end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
610 611 612 |
# File 'lib/cadenya/types.rb', line 610 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
610 611 612 |
# File 'lib/cadenya/types.rb', line 610 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
610 611 612 |
# File 'lib/cadenya/types.rb', line 610 def spec @spec end |
Class Method Details
.from_json(data) ⇒ Object
618 619 620 621 622 623 624 |
# File 'lib/cadenya/types.rb', line 618 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::AgentVariationSpec.from_json(data["spec"]), info: data["info"].nil? ? nil : Types::AgentVariationInfo.from_json(data["info"]), ) end |