Class: PutNetworkPrivateElementTypeElementIDResponse429

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



33788
33789
33790
33791
33792
33793
33794
# File 'lib/schemas.rb', line 33788

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

.from_json!(json) ⇒ Object



33796
33797
33798
# File 'lib/schemas.rb', line 33796

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

Instance Method Details

#to_dynamicObject



33800
33801
33802
33803
33804
33805
# File 'lib/schemas.rb', line 33800

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

#to_json(options = nil) ⇒ Object



33807
33808
33809
# File 'lib/schemas.rb', line 33807

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