Class: GetWorkspacesWorkspaceIDResponse401

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



17313
17314
17315
17316
17317
17318
# File 'lib/schemas.rb', line 17313

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

.from_json!(json) ⇒ Object



17320
17321
17322
# File 'lib/schemas.rb', line 17320

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

Instance Method Details

#to_dynamicObject



17324
17325
17326
17327
17328
# File 'lib/schemas.rb', line 17324

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

#to_json(options = nil) ⇒ Object



17330
17331
17332
# File 'lib/schemas.rb', line 17330

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