Class: PutWorkspacesWorkspaceIDResponse404

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



35109
35110
35111
35112
35113
35114
# File 'lib/schemas.rb', line 35109

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

.from_json!(json) ⇒ Object



35116
35117
35118
# File 'lib/schemas.rb', line 35116

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

Instance Method Details

#to_dynamicObject



35120
35121
35122
35123
35124
# File 'lib/schemas.rb', line 35120

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

#to_json(options = nil) ⇒ Object



35126
35127
35128
# File 'lib/schemas.rb', line 35126

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