Class: Cadenya::Types::AddAgentVariationAssignmentRequest_SubAgentId

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

Returns a new instance of AddAgentVariationAssignmentRequest_SubAgentId.



9224
9225
9226
9227
9228
9229
9230
# File 'lib/cadenya/types.rb', line 9224

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



9222
9223
9224
# File 'lib/cadenya/types.rb', line 9222

def agent_id
  @agent_id
end

#sub_agent_idObject (readonly)

Returns the value of attribute sub_agent_id.



9222
9223
9224
# File 'lib/cadenya/types.rb', line 9222

def sub_agent_id
  @sub_agent_id
end

#typeObject (readonly)

Returns the value of attribute type.



9222
9223
9224
# File 'lib/cadenya/types.rb', line 9222

def type
  @type
end

#variation_idObject (readonly)

Returns the value of attribute variation_id.



9222
9223
9224
# File 'lib/cadenya/types.rb', line 9222

def variation_id
  @variation_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



9222
9223
9224
# File 'lib/cadenya/types.rb', line 9222

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



9232
9233
9234
9235
9236
9237
9238
9239
9240
# File 'lib/cadenya/types.rb', line 9232

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

Instance Method Details

#to_hObject



9242
9243
9244
9245
9246
9247
9248
9249
9250
# File 'lib/cadenya/types.rb', line 9242

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