Class: Rafflesia::InfraRequestRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::InfraRequestRecord
- Defined in:
- lib/rafflesia/system/infra_request_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ actor: :actor, attempt: :attempt, created_at: :created_at, duration_ms: :duration_ms, error_code: :error_code, error_message: :error_message, finished_at: :finished_at, infra_request_id: :infra_request_id, is_ok: :is_ok, metadata: :metadata, method: :method, operation: :operation, provenance: :provenance, query_string: :query_string, request_digest: :request_digest, request_id: :request_id, request_size_bytes: :request_size_bytes, resource_path: :resource_path, response_size_bytes: :response_size_bytes, started_at: :started_at, status: :status, status_code: :status_code, target: :target, target_endpoint: :target_endpoint }.freeze
Instance Attribute Summary collapse
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#attempt ⇒ Object
Returns the value of attribute attempt.
-
#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.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#finished_at ⇒ Object
Returns the value of attribute finished_at.
-
#infra_request_id ⇒ Object
Returns the value of attribute infra_request_id.
-
#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.
-
#provenance ⇒ Object
Returns the value of attribute provenance.
-
#query_string ⇒ Object
Returns the value of attribute query_string.
-
#request_digest ⇒ Object
Returns the value of attribute request_digest.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#request_size_bytes ⇒ Object
Returns the value of attribute request_size_bytes.
-
#resource_path ⇒ Object
Returns the value of attribute resource_path.
-
#response_size_bytes ⇒ Object
Returns the value of attribute response_size_bytes.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
-
#target ⇒ Object
Returns the value of attribute target.
-
#target_endpoint ⇒ Object
Returns the value of attribute target_endpoint.
Instance Method Summary collapse
-
#initialize(json) ⇒ InfraRequestRecord
constructor
A new instance of InfraRequestRecord.
Constructor Details
#initialize(json) ⇒ InfraRequestRecord
Returns a new instance of InfraRequestRecord.
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 86 87 88 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 61 def initialize(json) super() hash = self.class.normalize(json) @actor = hash[:actor] ? Rafflesia::AuditLogActor.new(hash[:actor]) : nil @attempt = hash[:attempt] @created_at = hash[:created_at] @duration_ms = hash[:duration_ms] @error_code = hash[:error_code] @error_message = hash[:error_message] @finished_at = hash[:finished_at] @infra_request_id = hash[:infra_request_id] @is_ok = hash[:is_ok] @metadata = hash[:metadata] || {} @method = hash[:method] @operation = hash[:operation] @provenance = hash[:provenance] || {} @query_string = hash[:query_string] @request_digest = hash[:request_digest] @request_id = hash[:request_id] @request_size_bytes = hash[:request_size_bytes] @resource_path = hash[:resource_path] @response_size_bytes = hash[:response_size_bytes] @started_at = hash[:started_at] @status = hash[:status] @status_code = hash[:status_code] @target = hash[:target] @target_endpoint = hash[:target_endpoint] end |
Instance Attribute Details
#actor ⇒ Object
Returns the value of attribute actor.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def actor @actor end |
#attempt ⇒ Object
Returns the value of attribute attempt.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def attempt @attempt end |
#created_at ⇒ Object
Returns the value of attribute created_at.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def created_at @created_at end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def duration_ms @duration_ms end |
#error_code ⇒ Object
Returns the value of attribute error_code.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def error_code @error_code end |
#error_message ⇒ Object
Returns the value of attribute error_message.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def @error_message end |
#finished_at ⇒ Object
Returns the value of attribute finished_at.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def finished_at @finished_at end |
#infra_request_id ⇒ Object
Returns the value of attribute infra_request_id.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def infra_request_id @infra_request_id end |
#is_ok ⇒ Object
Returns the value of attribute is_ok.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def is_ok @is_ok end |
#metadata ⇒ Object
Returns the value of attribute metadata.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def @metadata end |
#method ⇒ Object
Returns the value of attribute method.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def method @method end |
#operation ⇒ Object
Returns the value of attribute operation.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def operation @operation end |
#provenance ⇒ Object
Returns the value of attribute provenance.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def provenance @provenance end |
#query_string ⇒ Object
Returns the value of attribute query_string.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def query_string @query_string end |
#request_digest ⇒ Object
Returns the value of attribute request_digest.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def request_digest @request_digest end |
#request_id ⇒ Object
Returns the value of attribute request_id.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def request_id @request_id end |
#request_size_bytes ⇒ Object
Returns the value of attribute request_size_bytes.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def request_size_bytes @request_size_bytes end |
#resource_path ⇒ Object
Returns the value of attribute resource_path.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def resource_path @resource_path end |
#response_size_bytes ⇒ Object
Returns the value of attribute response_size_bytes.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def response_size_bytes @response_size_bytes end |
#started_at ⇒ Object
Returns the value of attribute started_at.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def status @status end |
#status_code ⇒ Object
Returns the value of attribute status_code.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def status_code @status_code end |
#target ⇒ Object
Returns the value of attribute target.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def target @target end |
#target_endpoint ⇒ Object
Returns the value of attribute target_endpoint.
35 36 37 |
# File 'lib/rafflesia/system/infra_request_record.rb', line 35 def target_endpoint @target_endpoint end |