Class: PutNetworkPrivateElementTypeElementIDResponse404

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



33758
33759
33760
33761
33762
33763
# File 'lib/schemas.rb', line 33758

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? PutNetworkPrivateElementTypeElementIDResponse404Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



33765
33766
33767
# File 'lib/schemas.rb', line 33765

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

Instance Method Details

#to_dynamicObject



33769
33770
33771
33772
33773
# File 'lib/schemas.rb', line 33769

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



33775
33776
33777
# File 'lib/schemas.rb', line 33775

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