Class: PutNetworkPrivateElementTypeElementIDResponse403

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



33701
33702
33703
33704
33705
33706
# File 'lib/schemas.rb', line 33701

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

.from_json!(json) ⇒ Object



33708
33709
33710
# File 'lib/schemas.rb', line 33708

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

Instance Method Details

#to_dynamicObject



33712
33713
33714
33715
33716
# File 'lib/schemas.rb', line 33712

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

#to_json(options = nil) ⇒ Object



33718
33719
33720
# File 'lib/schemas.rb', line 33718

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