Class: GetWorkspacesWorkspaceIDResponse500Error

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



17437
17438
17439
17440
17441
17442
17443
# File 'lib/schemas.rb', line 17437

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

.from_json!(json) ⇒ Object



17445
17446
17447
# File 'lib/schemas.rb', line 17445

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

Instance Method Details

#to_dynamicObject



17449
17450
17451
17452
17453
17454
# File 'lib/schemas.rb', line 17449

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

#to_json(options = nil) ⇒ Object



17456
17457
17458
# File 'lib/schemas.rb', line 17456

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