Class: Cadenya::Types::APIKey
- Inherits:
-
Object
- Object
- Cadenya::Types::APIKey
- 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.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, info: nil, state: nil) ⇒ APIKey
constructor
A new instance of APIKey.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil, state: nil) ⇒ APIKey
Returns a new instance of APIKey.
120 121 122 123 124 125 |
# File 'lib/cadenya/types.rb', line 120 def initialize(metadata: nil, spec: nil, info: nil, state: nil) @metadata = @spec = spec @info = info @state = state end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
118 119 120 |
# File 'lib/cadenya/types.rb', line 118 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
118 119 120 |
# File 'lib/cadenya/types.rb', line 118 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
118 119 120 |
# File 'lib/cadenya/types.rb', line 118 def spec @spec end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
118 119 120 |
# File 'lib/cadenya/types.rb', line 118 def state @state end |
Class Method Details
.from_json(data) ⇒ Object
127 128 129 130 131 132 133 134 |
# File 'lib/cadenya/types.rb', line 127 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::AccountResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::APIKeySpec.from_json(data["spec"]), info: data["info"].nil? ? nil : Types::APIKeyInfo.from_json(data["info"]), state: data["state"], ) end |