Class: GetNetworkPrivateNetworkEntityRequestAllResponseRequestsItemResponse

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



13331
13332
13333
13334
13335
13336
13337
13338
# File 'lib/schemas.rb', line 13331

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    created_at: d["createdAt"],
    created_by: d["createdBy"],
    message:    d["message"],
  )
end

.from_json!(json) ⇒ Object



13340
13341
13342
# File 'lib/schemas.rb', line 13340

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

Instance Method Details

#to_dynamicObject



13344
13345
13346
13347
13348
13349
13350
# File 'lib/schemas.rb', line 13344

def to_dynamic
  {
    "createdAt" => created_at,
    "createdBy" => created_by,
    "message"   => message,
  }
end

#to_json(options = nil) ⇒ Object



13352
13353
13354
# File 'lib/schemas.rb', line 13352

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