Class: GetWorkspacesWorkspaceIDResponse500

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



17464
17465
17466
17467
17468
17469
# File 'lib/schemas.rb', line 17464

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

.from_json!(json) ⇒ Object



17471
17472
17473
# File 'lib/schemas.rb', line 17471

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

Instance Method Details

#to_dynamicObject



17475
17476
17477
17478
17479
# File 'lib/schemas.rb', line 17475

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

#to_json(options = nil) ⇒ Object



17481
17482
17483
# File 'lib/schemas.rb', line 17481

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