Class: Cadenya::Types::AIProviderKey
- Inherits:
-
Object
- Object
- Cadenya::Types::AIProviderKey
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, info: nil) ⇒ AIProviderKey
constructor
A new instance of AIProviderKey.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil) ⇒ AIProviderKey
Returns a new instance of AIProviderKey.
38 39 40 41 42 |
# File 'lib/cadenya/types.rb', line 38 def initialize(metadata: nil, spec: nil, info: nil) @metadata = @spec = spec @info = info end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
36 37 38 |
# File 'lib/cadenya/types.rb', line 36 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
36 37 38 |
# File 'lib/cadenya/types.rb', line 36 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
36 37 38 |
# File 'lib/cadenya/types.rb', line 36 def spec @spec end |
Class Method Details
.from_json(data) ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/cadenya/types.rb', line 44 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::AIProviderKeySpec.from_json(data["spec"]), info: data["info"].nil? ? nil : Types::AIProviderKeyInfo.from_json(data["info"]), ) end |