Class: PutWorkspacesWorkspaceIDResponse500Error

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



35171
35172
35173
35174
35175
35176
35177
# File 'lib/schemas.rb', line 35171

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    message:                                            d["message"],
    put_workspaces_workspace_id_response500_error_name: d["name"],
  )
end

.from_json!(json) ⇒ Object



35179
35180
35181
# File 'lib/schemas.rb', line 35179

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

Instance Method Details

#to_dynamicObject



35183
35184
35185
35186
35187
35188
# File 'lib/schemas.rb', line 35183

def to_dynamic
  {
    "message" => message,
    "name"    => put_workspaces_workspace_id_response500_error_name,
  }
end

#to_json(options = nil) ⇒ Object



35190
35191
35192
# File 'lib/schemas.rb', line 35190

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