Class: Rafflesia::AuditLogRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::AuditLogRecord
- Defined in:
- lib/rafflesia/audit/audit_log_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ actor: :actor, audit_log_id: :audit_log_id, created_at: :created_at, duration_ms: :duration_ms, error_code: :error_code, evidence: :evidence, finished_at: :finished_at, input_hash: :input_hash, is_ok: :is_ok, metadata: :metadata, method: :method, operation: :operation, parameters_hash: :parameters_hash, path: :path, query_string: :query_string, request_body: :request_body, request_id: :request_id, request_size_bytes: :request_size_bytes, response_size_bytes: :response_size_bytes, route_path: :route_path, started_at: :started_at, status_code: :status_code, warning_count: :warning_count }.freeze
Instance Attribute Summary collapse
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#audit_log_id ⇒ Object
Returns the value of attribute audit_log_id.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#evidence ⇒ Object
Returns the value of attribute evidence.
-
#finished_at ⇒ Object
Returns the value of attribute finished_at.
-
#input_hash ⇒ Object
Returns the value of attribute input_hash.
-
#is_ok ⇒ Object
Returns the value of attribute is_ok.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#method ⇒ Object
Returns the value of attribute method.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#parameters_hash ⇒ Object
Returns the value of attribute parameters_hash.
-
#path ⇒ Object
Returns the value of attribute path.
-
#query_string ⇒ Object
Returns the value of attribute query_string.
-
#request_body ⇒ Object
Returns the value of attribute request_body.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#request_size_bytes ⇒ Object
Returns the value of attribute request_size_bytes.
-
#response_size_bytes ⇒ Object
Returns the value of attribute response_size_bytes.
-
#route_path ⇒ Object
Returns the value of attribute route_path.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
-
#warning_count ⇒ Object
Returns the value of attribute warning_count.
Instance Method Summary collapse
-
#initialize(json) ⇒ AuditLogRecord
constructor
A new instance of AuditLogRecord.
Constructor Details
#initialize(json) ⇒ AuditLogRecord
Returns a new instance of AuditLogRecord.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 59 def initialize(json) super() hash = self.class.normalize(json) @actor = hash[:actor] ? Rafflesia::AuditLogActor.new(hash[:actor]) : nil @audit_log_id = hash[:audit_log_id] @created_at = hash[:created_at] @duration_ms = hash[:duration_ms] @error_code = hash[:error_code] @evidence = hash[:evidence] ? Rafflesia::EvidenceSummary.new(hash[:evidence]) : nil @finished_at = hash[:finished_at] @input_hash = hash[:input_hash] @is_ok = hash[:is_ok] @metadata = hash[:metadata] || {} @method = hash[:method] @operation = hash[:operation] @parameters_hash = hash[:parameters_hash] @path = hash[:path] @query_string = hash[:query_string] @request_body = hash[:request_body] @request_id = hash[:request_id] @request_size_bytes = hash[:request_size_bytes] @response_size_bytes = hash[:response_size_bytes] @route_path = hash[:route_path] @started_at = hash[:started_at] @status_code = hash[:status_code] @warning_count = hash[:warning_count] end |
Instance Attribute Details
#actor ⇒ Object
Returns the value of attribute actor.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def actor @actor end |
#audit_log_id ⇒ Object
Returns the value of attribute audit_log_id.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def audit_log_id @audit_log_id end |
#created_at ⇒ Object
Returns the value of attribute created_at.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def created_at @created_at end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def duration_ms @duration_ms end |
#error_code ⇒ Object
Returns the value of attribute error_code.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def error_code @error_code end |
#evidence ⇒ Object
Returns the value of attribute evidence.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def evidence @evidence end |
#finished_at ⇒ Object
Returns the value of attribute finished_at.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def finished_at @finished_at end |
#input_hash ⇒ Object
Returns the value of attribute input_hash.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def input_hash @input_hash end |
#is_ok ⇒ Object
Returns the value of attribute is_ok.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def is_ok @is_ok end |
#metadata ⇒ Object
Returns the value of attribute metadata.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def @metadata end |
#method ⇒ Object
Returns the value of attribute method.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def method @method end |
#operation ⇒ Object
Returns the value of attribute operation.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def operation @operation end |
#parameters_hash ⇒ Object
Returns the value of attribute parameters_hash.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def parameters_hash @parameters_hash end |
#path ⇒ Object
Returns the value of attribute path.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def path @path end |
#query_string ⇒ Object
Returns the value of attribute query_string.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def query_string @query_string end |
#request_body ⇒ Object
Returns the value of attribute request_body.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def request_body @request_body end |
#request_id ⇒ Object
Returns the value of attribute request_id.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def request_id @request_id end |
#request_size_bytes ⇒ Object
Returns the value of attribute request_size_bytes.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def request_size_bytes @request_size_bytes end |
#response_size_bytes ⇒ Object
Returns the value of attribute response_size_bytes.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def response_size_bytes @response_size_bytes end |
#route_path ⇒ Object
Returns the value of attribute route_path.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def route_path @route_path end |
#started_at ⇒ Object
Returns the value of attribute started_at.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def started_at @started_at end |
#status_code ⇒ Object
Returns the value of attribute status_code.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def status_code @status_code end |
#warning_count ⇒ Object
Returns the value of attribute warning_count.
34 35 36 |
# File 'lib/rafflesia/audit/audit_log_record.rb', line 34 def warning_count @warning_count end |