Class: PutNetworkPrivateNetworkEntityRequestRequestIDResponseRequestItemResponse

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



33996
33997
33998
33999
34000
34001
34002
34003
# File 'lib/schemas.rb', line 33996

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



34005
34006
34007
# File 'lib/schemas.rb', line 34005

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

Instance Method Details

#to_dynamicObject



34009
34010
34011
34012
34013
34014
34015
# File 'lib/schemas.rb', line 34009

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

#to_json(options = nil) ⇒ Object



34017
34018
34019
# File 'lib/schemas.rb', line 34017

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