Class: GetWorkspacesWorkspaceIDResponse401Error

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



17286
17287
17288
17289
17290
17291
17292
# File 'lib/schemas.rb', line 17286

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

.from_json!(json) ⇒ Object



17294
17295
17296
# File 'lib/schemas.rb', line 17294

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

Instance Method Details

#to_dynamicObject



17298
17299
17300
17301
17302
17303
# File 'lib/schemas.rb', line 17298

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

#to_json(options = nil) ⇒ Object



17305
17306
17307
# File 'lib/schemas.rb', line 17305

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