Class: GetNetworkPrivateNetworkEntityRequestAllResponse401

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



13519
13520
13521
13522
13523
13524
# File 'lib/schemas.rb', line 13519

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

.from_json!(json) ⇒ Object



13526
13527
13528
# File 'lib/schemas.rb', line 13526

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

Instance Method Details

#to_dynamicObject



13530
13531
13532
13533
13534
# File 'lib/schemas.rb', line 13530

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



13536
13537
13538
# File 'lib/schemas.rb', line 13536

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