Class: PutEnvironmentsEnvironmentIDResponse429

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



32324
32325
32326
32327
32328
32329
32330
# File 'lib/schemas.rb', line 32324

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error:   d["error"],
    message: d["message"],
  )
end

.from_json!(json) ⇒ Object



32332
32333
32334
# File 'lib/schemas.rb', line 32332

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

Instance Method Details

#to_dynamicObject



32336
32337
32338
32339
32340
32341
# File 'lib/schemas.rb', line 32336

def to_dynamic
  {
    "error"   => error,
    "message" => message,
  }
end

#to_json(options = nil) ⇒ Object



32343
32344
32345
# File 'lib/schemas.rb', line 32343

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