Class: Cadenya::Types::UpdateAgentVariationRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workspace_id: nil, agent_id: nil, id: nil, metadata: nil, spec: nil, update_mask: nil) ⇒ UpdateAgentVariationRequest

Returns a new instance of UpdateAgentVariationRequest.



6727
6728
6729
6730
6731
6732
6733
6734
# File 'lib/cadenya/types.rb', line 6727

def initialize(workspace_id: nil, agent_id: nil, id: nil, metadata: nil, spec: nil, update_mask: nil)
  @workspace_id = workspace_id
  @agent_id = agent_id
  @id = id
  @metadata = 
  @spec = spec
  @update_mask = update_mask
end

Instance Attribute Details

#agent_idObject (readonly)

Returns the value of attribute agent_id.



6725
6726
6727
# File 'lib/cadenya/types.rb', line 6725

def agent_id
  @agent_id
end

#idObject (readonly)

Returns the value of attribute id.



6725
6726
6727
# File 'lib/cadenya/types.rb', line 6725

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6725
6726
6727
# File 'lib/cadenya/types.rb', line 6725

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6725
6726
6727
# File 'lib/cadenya/types.rb', line 6725

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6725
6726
6727
# File 'lib/cadenya/types.rb', line 6725

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6725
6726
6727
# File 'lib/cadenya/types.rb', line 6725

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
# File 'lib/cadenya/types.rb', line 6736

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    agent_id: data["agentId"],
    id: data["id"],
    metadata: data["metadata"].nil? ? nil : Types::UpdateResourceMetadata.from_json(data["metadata"]),
    spec: data["spec"].nil? ? nil : Types::AgentVariationSpec.from_json(data["spec"]),
    update_mask: data["updateMask"],
  )
end

Instance Method Details

#to_hObject



6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
# File 'lib/cadenya/types.rb', line 6747

def to_h
  {
    workspace_id: Util.plain(@workspace_id),
    agent_id: Util.plain(@agent_id),
    id: Util.plain(@id),
    metadata: Util.plain(@metadata),
    spec: Util.plain(@spec),
    update_mask: Util.plain(@update_mask),
  }.reject { |_k, v| v.nil? }
end