Class: GetWorkspacesResponse500

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



16822
16823
16824
16825
16826
16827
# File 'lib/schemas.rb', line 16822

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

.from_json!(json) ⇒ Object



16829
16830
16831
# File 'lib/schemas.rb', line 16829

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

Instance Method Details

#to_dynamicObject



16833
16834
16835
16836
16837
# File 'lib/schemas.rb', line 16833

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

#to_json(options = nil) ⇒ Object



16839
16840
16841
# File 'lib/schemas.rb', line 16839

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