Class: Cadenya::Types::UpdateAgentRequest

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, id: nil, metadata: nil, spec: nil, update_mask: nil) ⇒ UpdateAgentRequest

Returns a new instance of UpdateAgentRequest.



6628
6629
6630
6631
6632
6633
6634
# File 'lib/cadenya/types.rb', line 6628

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6626
6627
6628
# File 'lib/cadenya/types.rb', line 6626

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6626
6627
6628
# File 'lib/cadenya/types.rb', line 6626

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6626
6627
6628
# File 'lib/cadenya/types.rb', line 6626

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6626
6627
6628
# File 'lib/cadenya/types.rb', line 6626

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6626
6627
6628
# File 'lib/cadenya/types.rb', line 6626

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6636
6637
6638
6639
6640
6641
6642
6643
6644
# File 'lib/cadenya/types.rb', line 6636

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

Instance Method Details

#to_hObject



6646
6647
6648
6649
6650
6651
6652
6653
6654
# File 'lib/cadenya/types.rb', line 6646

def to_h
  {
    workspace_id: Util.plain(@workspace_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