Class: PutWorkspacesWorkspaceIDResponse404Error

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



35082
35083
35084
35085
35086
35087
35088
# File 'lib/schemas.rb', line 35082

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

.from_json!(json) ⇒ Object



35090
35091
35092
# File 'lib/schemas.rb', line 35090

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

Instance Method Details

#to_dynamicObject



35094
35095
35096
35097
35098
35099
# File 'lib/schemas.rb', line 35094

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

#to_json(options = nil) ⇒ Object



35101
35102
35103
# File 'lib/schemas.rb', line 35101

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