Class: GetSecretResponse

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



1438
1439
1440
1441
1442
1443
# File 'lib/schemas.rb', line 1438

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    secret: GetSecretResponseSecret.from_dynamic!(d.fetch("secret")),
  )
end

.from_json!(json) ⇒ Object



1445
1446
1447
# File 'lib/schemas.rb', line 1445

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



1449
1450
1451
1452
1453
# File 'lib/schemas.rb', line 1449

def to_dynamic
  {
    "secret" => secret.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



1455
1456
1457
# File 'lib/schemas.rb', line 1455

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end