Class: PutNetworkPrivateNetworkEntityRequestRequestIDBody

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



33909
33910
33911
33912
33913
33914
33915
# File 'lib/schemas.rb', line 33909

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    response: d["response"] ? PutNetworkPrivateNetworkEntityRequestRequestIDBodyResponse.from_dynamic!(d["response"]) : nil,
    status:   d.fetch("status"),
  )
end

.from_json!(json) ⇒ Object



33917
33918
33919
# File 'lib/schemas.rb', line 33917

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

Instance Method Details

#to_dynamicObject



33921
33922
33923
33924
33925
33926
# File 'lib/schemas.rb', line 33921

def to_dynamic
  {
    "response" => response&.to_dynamic,
    "status"   => status,
  }
end

#to_json(options = nil) ⇒ Object



33928
33929
33930
# File 'lib/schemas.rb', line 33928

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