Class: Cadenya::Types::CreateAgentRequest
- Inherits:
-
Object
- Object
- Cadenya::Types::CreateAgentRequest
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#default_variation ⇒ Object
readonly
Returns the value of attribute default_variation.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#workspace_id ⇒ Object
readonly
Returns the value of attribute workspace_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(workspace_id: nil, metadata: nil, spec: nil, default_variation: nil) ⇒ CreateAgentRequest
constructor
A new instance of CreateAgentRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(workspace_id: nil, metadata: nil, spec: nil, default_variation: nil) ⇒ CreateAgentRequest
Returns a new instance of CreateAgentRequest.
1529 1530 1531 1532 1533 1534 |
# File 'lib/cadenya/types.rb', line 1529 def initialize(workspace_id: nil, metadata: nil, spec: nil, default_variation: nil) @workspace_id = workspace_id @metadata = @spec = spec @default_variation = default_variation end |
Instance Attribute Details
#default_variation ⇒ Object (readonly)
Returns the value of attribute default_variation.
1527 1528 1529 |
# File 'lib/cadenya/types.rb', line 1527 def default_variation @default_variation end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
1527 1528 1529 |
# File 'lib/cadenya/types.rb', line 1527 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
1527 1528 1529 |
# File 'lib/cadenya/types.rb', line 1527 def spec @spec end |
#workspace_id ⇒ Object (readonly)
Returns the value of attribute workspace_id.
1527 1528 1529 |
# File 'lib/cadenya/types.rb', line 1527 def workspace_id @workspace_id end |
Class Method Details
.from_json(data) ⇒ Object
1536 1537 1538 1539 1540 1541 1542 1543 |
# File 'lib/cadenya/types.rb', line 1536 def self.from_json(data) new( workspace_id: data["workspaceId"], metadata: data["metadata"].nil? ? nil : Types::CreateResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::AgentSpec.from_json(data["spec"]), default_variation: data["defaultVariation"].nil? ? nil : Types::CreateAgentVariationRequest.from_json(data["defaultVariation"]), ) end |