Class: UpdateSecretResponseSecret
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- UpdateSecretResponseSecret
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 |
# File 'lib/schemas.rb', line 1581 def self.from_dynamic!(d) d = Types::Hash[d] new( environment: d.fetch("environment"), is_fallback: d["isFallback"], secret_comment: d.fetch("secretComment"), secret_key: d.fetch("secretKey"), secret_path: d["secretPath"], secret_value: d.fetch("secretValue"), secret_type: d.fetch("type"), version: d.fetch("version"), workspace: d.fetch("workspace"), ) end |
.from_json!(json) ⇒ Object
1596 1597 1598 |
# File 'lib/schemas.rb', line 1596 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 |
# File 'lib/schemas.rb', line 1600 def to_dynamic { "environment" => environment, "isFallback" => is_fallback, "secretComment" => secret_comment, "secretKey" => secret_key, "secretPath" => secret_path, "secretValue" => secret_value, "type" => secret_type, "version" => version, "workspace" => workspace, } end |
#to_json(options = nil) ⇒ Object
1614 1615 1616 |
# File 'lib/schemas.rb', line 1614 def to_json( = nil) JSON.generate(to_dynamic, ) end |