Class: GetWorkspacesResponse500Error

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



16795
16796
16797
16798
16799
16800
16801
# File 'lib/schemas.rb', line 16795

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

.from_json!(json) ⇒ Object



16803
16804
16805
# File 'lib/schemas.rb', line 16803

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

Instance Method Details

#to_dynamicObject



16807
16808
16809
16810
16811
16812
# File 'lib/schemas.rb', line 16807

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

#to_json(options = nil) ⇒ Object



16814
16815
16816
# File 'lib/schemas.rb', line 16814

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