Class: Cadenya::Types::ToolSetSecret

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(metadata: nil, spec: nil, info: nil) ⇒ ToolSetSecret

Returns a new instance of ToolSetSecret.



6274
6275
6276
6277
6278
# File 'lib/cadenya/types.rb', line 6274

def initialize(metadata: nil, spec: nil, info: nil)
  @metadata = 
  @spec = spec
  @info = info
end

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info.



6272
6273
6274
# File 'lib/cadenya/types.rb', line 6272

def info
  @info
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6272
6273
6274
# File 'lib/cadenya/types.rb', line 6272

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6272
6273
6274
# File 'lib/cadenya/types.rb', line 6272

def spec
  @spec
end

Class Method Details

.from_json(data) ⇒ Object



6280
6281
6282
6283
6284
6285
6286
# File 'lib/cadenya/types.rb', line 6280

def self.from_json(data)
  new(
    metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]),
    spec: data["spec"].nil? ? nil : Types::ToolSetSecretSpec.from_json(data["spec"]),
    info: data["info"].nil? ? nil : Types::ToolSetSecretInfo.from_json(data["info"]),
  )
end

Instance Method Details

#to_hObject



6288
6289
6290
6291
6292
6293
6294
# File 'lib/cadenya/types.rb', line 6288

def to_h
  {
    metadata: Util.plain(@metadata),
    spec: Util.plain(@spec),
    info: Util.plain(@info),
  }.reject { |_k, v| v.nil? }
end