Class: GetAuditLogsResponse401Error

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



7138
7139
7140
7141
7142
7143
7144
# File 'lib/schemas.rb', line 7138

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

.from_json!(json) ⇒ Object



7146
7147
7148
# File 'lib/schemas.rb', line 7146

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

Instance Method Details

#to_dynamicObject



7150
7151
7152
7153
7154
7155
# File 'lib/schemas.rb', line 7150

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

#to_json(options = nil) ⇒ Object



7157
7158
7159
# File 'lib/schemas.rb', line 7157

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