Class: OCI::Audit::Models::AuditEvent
- Inherits:
-
Object
- Object
- OCI::Audit::Models::AuditEvent
- Defined in:
- lib/oci/audit/models/audit_event.rb
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
The OCID of the compartment.
-
#credential_id ⇒ String
The credential ID of the user.
-
#event_id ⇒ String
The GUID of the event.
-
#event_source ⇒ String
The source of the event.
-
#event_time ⇒ DateTime
The time the event occurred, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format.
-
#event_type ⇒ String
The type of the event.
-
#principal_id ⇒ String
The OCID of the user whose action triggered the event.
-
#request_action ⇒ String
The HTTP method of the request.
-
#request_agent ⇒ String
The user agent of the client that made the request.
-
#request_headers ⇒ Hash<String, Array<String>>
The HTTP header fields and values in the request.
-
#request_id ⇒ String
The opc-request-id of the request.
-
#request_origin ⇒ String
The IP address of the source of the request.
-
#request_parameters ⇒ Hash<String, Array<String>>
The query parameter fields and values for the request.
-
#request_resource ⇒ String
The resource targeted by the request.
-
#response_headers ⇒ Hash<String, Array<String>>
The headers of the response.
-
#response_payload ⇒ Hash<String, Object>
Metadata of interest from the response payload.
-
#response_status ⇒ String
The status code of the response.
-
#response_time ⇒ DateTime
The time of the response to the audited request, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format.
-
#tenant_id ⇒ String
The OCID of the tenant.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AuditEvent
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ AuditEvent
Initializes the object
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/audit/models/audit_event.rb', line 105 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes[:'tenantId'] self.tenant_id = attributes[:'tenantId'] end if attributes[:'compartmentId'] self.compartment_id = attributes[:'compartmentId'] end if attributes[:'eventId'] self.event_id = attributes[:'eventId'] end if attributes[:'eventSource'] self.event_source = attributes[:'eventSource'] end if attributes[:'eventType'] self.event_type = attributes[:'eventType'] end if attributes[:'eventTime'] self.event_time = attributes[:'eventTime'] end if attributes[:'principalId'] self.principal_id = attributes[:'principalId'] end if attributes[:'credentialId'] self.credential_id = attributes[:'credentialId'] end if attributes[:'requestAction'] self.request_action = attributes[:'requestAction'] end if attributes[:'requestId'] self.request_id = attributes[:'requestId'] end if attributes[:'requestAgent'] self.request_agent = attributes[:'requestAgent'] end if attributes[:'requestHeaders'] self.request_headers = attributes[:'requestHeaders'] end if attributes[:'requestOrigin'] self.request_origin = attributes[:'requestOrigin'] end if attributes[:'requestParameters'] self.request_parameters = attributes[:'requestParameters'] end if attributes[:'requestResource'] self.request_resource = attributes[:'requestResource'] end if attributes[:'responseHeaders'] self.response_headers = attributes[:'responseHeaders'] end if attributes[:'responseStatus'] self.response_status = attributes[:'responseStatus'] end if attributes[:'responseTime'] self.response_time = attributes[:'responseTime'] end if attributes[:'responsePayload'] self.response_payload = attributes[:'responsePayload'] end end |
Instance Attribute Details
#compartment_id ⇒ String
The OCID of the compartment.
13 14 15 |
# File 'lib/oci/audit/models/audit_event.rb', line 13 def compartment_id @compartment_id end |
#credential_id ⇒ String
The credential ID of the user. This value is extracted from the HTTP ‘Authorization’ request header. It consists of the tenantId, userId, and user fingerprint, all delimited by a slash (/).
37 38 39 |
# File 'lib/oci/audit/models/audit_event.rb', line 37 def credential_id @credential_id end |
#event_id ⇒ String
The GUID of the event.
17 18 19 |
# File 'lib/oci/audit/models/audit_event.rb', line 17 def event_id @event_id end |
#event_source ⇒ String
The source of the event.
21 22 23 |
# File 'lib/oci/audit/models/audit_event.rb', line 21 def event_source @event_source end |
#event_time ⇒ DateTime
The time the event occurred, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format.
29 30 31 |
# File 'lib/oci/audit/models/audit_event.rb', line 29 def event_time @event_time end |
#event_type ⇒ String
The type of the event.
25 26 27 |
# File 'lib/oci/audit/models/audit_event.rb', line 25 def event_type @event_type end |
#principal_id ⇒ String
The OCID of the user whose action triggered the event.
33 34 35 |
# File 'lib/oci/audit/models/audit_event.rb', line 33 def principal_id @principal_id end |
#request_action ⇒ String
The HTTP method of the request.
41 42 43 |
# File 'lib/oci/audit/models/audit_event.rb', line 41 def request_action @request_action end |
#request_agent ⇒ String
The user agent of the client that made the request.
49 50 51 |
# File 'lib/oci/audit/models/audit_event.rb', line 49 def request_agent @request_agent end |
#request_headers ⇒ Hash<String, Array<String>>
The HTTP header fields and values in the request.
53 54 55 |
# File 'lib/oci/audit/models/audit_event.rb', line 53 def request_headers @request_headers end |
#request_id ⇒ String
The opc-request-id of the request.
45 46 47 |
# File 'lib/oci/audit/models/audit_event.rb', line 45 def request_id @request_id end |
#request_origin ⇒ String
The IP address of the source of the request.
57 58 59 |
# File 'lib/oci/audit/models/audit_event.rb', line 57 def request_origin @request_origin end |
#request_parameters ⇒ Hash<String, Array<String>>
The query parameter fields and values for the request.
61 62 63 |
# File 'lib/oci/audit/models/audit_event.rb', line 61 def request_parameters @request_parameters end |
#request_resource ⇒ String
The resource targeted by the request.
65 66 67 |
# File 'lib/oci/audit/models/audit_event.rb', line 65 def request_resource @request_resource end |
#response_headers ⇒ Hash<String, Array<String>>
The headers of the response.
69 70 71 |
# File 'lib/oci/audit/models/audit_event.rb', line 69 def response_headers @response_headers end |
#response_payload ⇒ Hash<String, Object>
Metadata of interest from the response payload. For example, the OCID of a resource.
81 82 83 |
# File 'lib/oci/audit/models/audit_event.rb', line 81 def response_payload @response_payload end |
#response_status ⇒ String
The status code of the response.
73 74 75 |
# File 'lib/oci/audit/models/audit_event.rb', line 73 def response_status @response_status end |
#response_time ⇒ DateTime
The time of the response to the audited request, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format.
77 78 79 |
# File 'lib/oci/audit/models/audit_event.rb', line 77 def response_time @response_time end |
#tenant_id ⇒ String
The OCID of the tenant.
9 10 11 |
# File 'lib/oci/audit/models/audit_event.rb', line 9 def tenant_id @tenant_id end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/audit/models/audit_event.rb', line 191 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && tenant_id == other_object.tenant_id && compartment_id == other_object.compartment_id && event_id == other_object.event_id && event_source == other_object.event_source && event_type == other_object.event_type && event_time == other_object.event_time && principal_id == other_object.principal_id && credential_id == other_object.credential_id && request_action == other_object.request_action && request_id == other_object.request_id && request_agent == other_object.request_agent && request_headers == other_object.request_headers && request_origin == other_object.request_origin && request_parameters == other_object.request_parameters && request_resource == other_object.request_resource && response_headers == other_object.response_headers && response_status == other_object.response_status && response_time == other_object.response_time && response_payload == other_object.response_payload end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/oci/audit/models/audit_event.rb', line 230 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other_object) ⇒ Boolean
217 218 219 |
# File 'lib/oci/audit/models/audit_event.rb', line 217 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
223 224 225 |
# File 'lib/oci/audit/models/audit_event.rb', line 223 def hash [tenant_id, compartment_id, event_id, event_source, event_type, event_time, principal_id, credential_id, request_action, request_id, request_agent, request_headers, request_origin, request_parameters, request_resource, response_headers, response_status, response_time, response_payload].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
255 256 257 258 259 260 261 262 263 |
# File 'lib/oci/audit/models/audit_event.rb', line 255 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
249 250 251 |
# File 'lib/oci/audit/models/audit_event.rb', line 249 def to_s to_hash.to_s end |