Class: DeleteWorkspacesWorkspaceIDResponse401

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



4158
4159
4160
4161
4162
4163
# File 'lib/schemas.rb', line 4158

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

.from_json!(json) ⇒ Object



4165
4166
4167
# File 'lib/schemas.rb', line 4165

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

Instance Method Details

#to_dynamicObject



4169
4170
4171
4172
4173
# File 'lib/schemas.rb', line 4169

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

#to_json(options = nil) ⇒ Object



4175
4176
4177
# File 'lib/schemas.rb', line 4175

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