Class: GetAuditLogsResponse500Error

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



7227
7228
7229
7230
7231
7232
7233
# File 'lib/schemas.rb', line 7227

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

.from_json!(json) ⇒ Object



7235
7236
7237
# File 'lib/schemas.rb', line 7235

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

Instance Method Details

#to_dynamicObject



7239
7240
7241
7242
7243
7244
# File 'lib/schemas.rb', line 7239

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

#to_json(options = nil) ⇒ Object



7246
7247
7248
# File 'lib/schemas.rb', line 7246

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