Class: Cadenya::Types::AIProviderCredential_ApiKey
- Inherits:
-
Object
- Object
- Cadenya::Types::AIProviderCredential_ApiKey
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, api_key: nil) ⇒ AIProviderCredential_ApiKey
constructor
A new instance of AIProviderCredential_ApiKey.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, api_key: nil) ⇒ AIProviderCredential_ApiKey
Returns a new instance of AIProviderCredential_ApiKey.
9256 9257 9258 9259 |
# File 'lib/cadenya/types.rb', line 9256 def initialize(type: nil, api_key: nil) @type = type @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
9254 9255 9256 |
# File 'lib/cadenya/types.rb', line 9254 def api_key @api_key end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9254 9255 9256 |
# File 'lib/cadenya/types.rb', line 9254 def type @type end |
Class Method Details
.from_json(data) ⇒ Object
9261 9262 9263 9264 9265 9266 |
# File 'lib/cadenya/types.rb', line 9261 def self.from_json(data) new( type: data["type"], api_key: data["apiKey"].nil? ? nil : Types::CredentialAPIKey.from_json(data["apiKey"]), ) end |