Class: PutWorkspacesWorkspaceIDResponse403Error

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



35025
35026
35027
35028
35029
35030
35031
# File 'lib/schemas.rb', line 35025

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

.from_json!(json) ⇒ Object



35033
35034
35035
# File 'lib/schemas.rb', line 35033

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

Instance Method Details

#to_dynamicObject



35037
35038
35039
35040
35041
35042
# File 'lib/schemas.rb', line 35037

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

#to_json(options = nil) ⇒ Object



35044
35045
35046
# File 'lib/schemas.rb', line 35044

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