Class: Cadenya::Types::AddAgentVariationAssignmentRequest_ToolId

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_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil) ⇒ AddAgentVariationAssignmentRequest_ToolId

Returns a new instance of AddAgentVariationAssignmentRequest_ToolId.



9160
9161
9162
9163
9164
9165
9166
# File 'lib/cadenya/types.rb', line 9160

def initialize(type: nil, tool_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
  @type = type
  @tool_id = tool_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.



9158
9159
9160
# File 'lib/cadenya/types.rb', line 9158

def agent_id
  @agent_id
end

#tool_idObject (readonly)

Returns the value of attribute tool_id.



9158
9159
9160
# File 'lib/cadenya/types.rb', line 9158

def tool_id
  @tool_id
end

#typeObject (readonly)

Returns the value of attribute type.



9158
9159
9160
# File 'lib/cadenya/types.rb', line 9158

def type
  @type
end

#variation_idObject (readonly)

Returns the value of attribute variation_id.



9158
9159
9160
# File 'lib/cadenya/types.rb', line 9158

def variation_id
  @variation_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



9158
9159
9160
# File 'lib/cadenya/types.rb', line 9158

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



9168
9169
9170
9171
9172
9173
9174
9175
9176
# File 'lib/cadenya/types.rb', line 9168

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

Instance Method Details

#to_hObject



9178
9179
9180
9181
9182
9183
9184
9185
9186
# File 'lib/cadenya/types.rb', line 9178

def to_h
  {
    type: Util.plain(@type),
    tool_id: Util.plain(@tool_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