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



1402
1403
1404
1405
1406
1407
# File 'lib/schemas.rb', line 1402

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

.from_json!(json) ⇒ Object



1409
1410
1411
# File 'lib/schemas.rb', line 1409

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

Instance Method Details

#to_dynamicObject



1413
1414
1415
1416
1417
# File 'lib/schemas.rb', line 1413

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

#to_json(options = nil) ⇒ Object



1419
1420
1421
# File 'lib/schemas.rb', line 1419

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