Class: Cadenya::Types::UpdateAPIKeyRequest

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) ⇒ UpdateAPIKeyRequest

Returns a new instance of UpdateAPIKeyRequest.



6570
6571
6572
6573
6574
6575
6576
# File 'lib/cadenya/types.rb', line 6570

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.



6568
6569
6570
# File 'lib/cadenya/types.rb', line 6568

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6568
6569
6570
# File 'lib/cadenya/types.rb', line 6568

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6568
6569
6570
# File 'lib/cadenya/types.rb', line 6568

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6568
6569
6570
# File 'lib/cadenya/types.rb', line 6568

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6568
6569
6570
# File 'lib/cadenya/types.rb', line 6568

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6578
6579
6580
6581
6582
6583
6584
6585
6586
# File 'lib/cadenya/types.rb', line 6578

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

Instance Method Details

#to_hObject



6588
6589
6590
6591
6592
6593
6594
6595
6596
# File 'lib/cadenya/types.rb', line 6588

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