Class: Cadenya::Types::CreateAPIKeyRequest
- Inherits:
-
Object
- Object
- Cadenya::Types::CreateAPIKeyRequest
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#workspace_id ⇒ Object
readonly
Returns the value of attribute workspace_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, workspace_id: nil) ⇒ CreateAPIKeyRequest
constructor
A new instance of CreateAPIKeyRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, workspace_id: nil) ⇒ CreateAPIKeyRequest
Returns a new instance of CreateAPIKeyRequest.
1477 1478 1479 1480 1481 |
# File 'lib/cadenya/types.rb', line 1477 def initialize(metadata: nil, spec: nil, workspace_id: nil) @metadata = @spec = spec @workspace_id = workspace_id end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
1475 1476 1477 |
# File 'lib/cadenya/types.rb', line 1475 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
1475 1476 1477 |
# File 'lib/cadenya/types.rb', line 1475 def spec @spec end |
#workspace_id ⇒ Object (readonly)
Returns the value of attribute workspace_id.
1475 1476 1477 |
# File 'lib/cadenya/types.rb', line 1475 def workspace_id @workspace_id end |
Class Method Details
.from_json(data) ⇒ Object
1483 1484 1485 1486 1487 1488 1489 |
# File 'lib/cadenya/types.rb', line 1483 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::CreateAccountResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::APIKeySpec.from_json(data["spec"]), workspace_id: data["workspaceId"], ) end |