Class: ListSecretsResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- ListSecretsResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
1512 1513 1514 1515 1516 1517 |
# File 'lib/schemas.rb', line 1512 def self.from_dynamic!(d) d = Types::Hash[d] new( secrets: d.fetch("secrets").map { |x| SecretElement.from_dynamic!(x) }, ) end |
.from_json!(json) ⇒ Object
1519 1520 1521 |
# File 'lib/schemas.rb', line 1519 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1523 1524 1525 1526 1527 |
# File 'lib/schemas.rb', line 1523 def to_dynamic { "secrets" => secrets.map { |x| x.to_dynamic }, } end |
#to_json(options = nil) ⇒ Object
1529 1530 1531 |
# File 'lib/schemas.rb', line 1529 def to_json( = nil) JSON.generate(to_dynamic, ) end |