Class: SecretsDeleteResponse

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



2186
2187
2188
2189
2190
2191
# File 'lib/schemas.rb', line 2186

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    data: d.fetch("data").map { |x| SecretDeleteResponse.from_dynamic!(x) },
  )
end

.from_json!(json) ⇒ Object



2193
2194
2195
# File 'lib/schemas.rb', line 2193

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

Instance Method Details

#to_dynamicObject



2197
2198
2199
2200
2201
# File 'lib/schemas.rb', line 2197

def to_dynamic
  {
    "data" => data.map { |x| x.to_dynamic },
  }
end

#to_json(options = nil) ⇒ Object



2203
2204
2205
# File 'lib/schemas.rb', line 2203

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