Class: DeleteEnvironmentsEnvironmentIDResponse429

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



2095
2096
2097
2098
2099
2100
2101
# File 'lib/schemas.rb', line 2095

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

.from_json!(json) ⇒ Object



2103
2104
2105
# File 'lib/schemas.rb', line 2103

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

Instance Method Details

#to_dynamicObject



2107
2108
2109
2110
2111
2112
# File 'lib/schemas.rb', line 2107

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

#to_json(options = nil) ⇒ Object



2114
2115
2116
# File 'lib/schemas.rb', line 2114

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