Class: GetNetworkPrivateNetworkEntityRequestAllResponse

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



13428
13429
13430
13431
13432
13433
13434
# File 'lib/schemas.rb', line 13428

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    get_network_private_network_entity_request_all_response_meta: d["meta"] ? GetNetworkPrivateNetworkEntityRequestAllResponseMeta.from_dynamic!(d["meta"]) : nil,
    requests:                                                     d["requests"]&.map { |x| GetNetworkPrivateNetworkEntityRequestAllResponseRequestsItem.from_dynamic!(x) },
  )
end

.from_json!(json) ⇒ Object



13436
13437
13438
# File 'lib/schemas.rb', line 13436

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

Instance Method Details

#to_dynamicObject



13440
13441
13442
13443
13444
13445
# File 'lib/schemas.rb', line 13440

def to_dynamic
  {
    "meta"     => get_network_private_network_entity_request_all_response_meta&.to_dynamic,
    "requests" => requests&.map { |x| x.to_dynamic },
  }
end

#to_json(options = nil) ⇒ Object



13447
13448
13449
# File 'lib/schemas.rb', line 13447

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