Class: GetNetworkPrivateNetworkEntityRequestAllResponseRequestsItemElement

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



13292
13293
13294
13295
13296
13297
13298
13299
13300
# File 'lib/schemas.rb', line 13292

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    id:                                                                                 d["id"],
    get_network_private_network_entity_request_all_response_requests_item_element_name: d["name"],
    summary:                                                                            d["summary"],
    get_network_private_network_entity_request_all_response_requests_item_element_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



13302
13303
13304
# File 'lib/schemas.rb', line 13302

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

Instance Method Details

#to_dynamicObject



13306
13307
13308
13309
13310
13311
13312
13313
# File 'lib/schemas.rb', line 13306

def to_dynamic
  {
    "id"      => id,
    "name"    => get_network_private_network_entity_request_all_response_requests_item_element_name,
    "summary" => summary,
    "type"    => get_network_private_network_entity_request_all_response_requests_item_element_type,
  }
end

#to_json(options = nil) ⇒ Object



13315
13316
13317
# File 'lib/schemas.rb', line 13315

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