Class: Cadenya::Types::AddAgentVariationAssignmentRequest_ToolSetId

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(type: nil, tool_set_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil) ⇒ AddAgentVariationAssignmentRequest_ToolSetId

Returns a new instance of AddAgentVariationAssignmentRequest_ToolSetId.



9192
9193
9194
9195
9196
9197
9198
# File 'lib/cadenya/types.rb', line 9192

def initialize(type: nil, tool_set_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
  @type = type
  @tool_set_id = tool_set_id
  @workspace_id = workspace_id
  @agent_id = agent_id
  @variation_id = variation_id
end

Instance Attribute Details

#agent_idObject (readonly)

Returns the value of attribute agent_id.



9190
9191
9192
# File 'lib/cadenya/types.rb', line 9190

def agent_id
  @agent_id
end

#tool_set_idObject (readonly)

Returns the value of attribute tool_set_id.



9190
9191
9192
# File 'lib/cadenya/types.rb', line 9190

def tool_set_id
  @tool_set_id
end

#typeObject (readonly)

Returns the value of attribute type.



9190
9191
9192
# File 'lib/cadenya/types.rb', line 9190

def type
  @type
end

#variation_idObject (readonly)

Returns the value of attribute variation_id.



9190
9191
9192
# File 'lib/cadenya/types.rb', line 9190

def variation_id
  @variation_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



9190
9191
9192
# File 'lib/cadenya/types.rb', line 9190

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



9200
9201
9202
9203
9204
9205
9206
9207
9208
# File 'lib/cadenya/types.rb', line 9200

def self.from_json(data)
  new(
    type: data["type"],
    tool_set_id: data["toolSetId"],
    workspace_id: data["workspaceId"],
    agent_id: data["agentId"],
    variation_id: data["variationId"],
  )
end

Instance Method Details

#to_hObject



9210
9211
9212
9213
9214
9215
9216
9217
9218
# File 'lib/cadenya/types.rb', line 9210

def to_h
  {
    type: Util.plain(@type),
    tool_set_id: Util.plain(@tool_set_id),
    workspace_id: Util.plain(@workspace_id),
    agent_id: Util.plain(@agent_id),
    variation_id: Util.plain(@variation_id),
  }.reject { |_k, v| v.nil? }
end