Class: GetNetworkPrivateNetworkEntityRequestAllResponseMeta

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



13246
13247
13248
13249
13250
13251
13252
13253
# File 'lib/schemas.rb', line 13246

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    limit:       d["limit"],
    offset:      d["offset"],
    total_count: d["totalCount"],
  )
end

.from_json!(json) ⇒ Object



13255
13256
13257
# File 'lib/schemas.rb', line 13255

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

Instance Method Details

#to_dynamicObject



13259
13260
13261
13262
13263
13264
13265
# File 'lib/schemas.rb', line 13259

def to_dynamic
  {
    "limit"      => limit,
    "offset"     => offset,
    "totalCount" => total_count,
  }
end

#to_json(options = nil) ⇒ Object



13267
13268
13269
# File 'lib/schemas.rb', line 13267

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