Class: GetNetworkPrivateNetworkEntityRequestAllResponse429

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



13606
13607
13608
13609
13610
13611
13612
# File 'lib/schemas.rb', line 13606

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

.from_json!(json) ⇒ Object



13614
13615
13616
# File 'lib/schemas.rb', line 13614

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

Instance Method Details

#to_dynamicObject



13618
13619
13620
13621
13622
13623
# File 'lib/schemas.rb', line 13618

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

#to_json(options = nil) ⇒ Object



13625
13626
13627
# File 'lib/schemas.rb', line 13625

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