Class: Zernio::ListLogs200ResponseLogsInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::ListLogs200ResponseLogsInner
- Defined in:
- lib/zernio-sdk/models/list_logs200_response_logs_inner.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#action ⇒ Object
Specific action (post.published, message.sent, account.connected, etc.).
-
#api_key_id ⇒ Object
The API key that made the request (api_request logs).
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#endpoint ⇒ Object
The API endpoint that triggered this log.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#ip_address ⇒ Object
Client IP address (api_request logs).
-
#metadata ⇒ Object
Additional context as JSON string.
-
#method ⇒ Object
HTTP method (api_request logs).
-
#path ⇒ Object
Request path (api_request logs).
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#request_body ⇒ Object
Request JSON (truncated to 5KB).
-
#request_id ⇒ Object
Correlation ID linking every log from one API request (api_request logs).
-
#response_body ⇒ Object
Response JSON (truncated to 10KB).
-
#status ⇒ Object
Returns the value of attribute status.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
-
#type ⇒ Object
Log category (publishing, connections, webhooks, messaging).
-
#user_agent ⇒ Object
Client user-agent (api_request logs).
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ListLogs200ResponseLogsInner
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ListLogs200ResponseLogsInner
Initializes the object
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 166 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListLogs200ResponseLogsInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListLogs200ResponseLogsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'action') self.action = attributes[:'action'] end if attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] end if attributes.key?(:'platform') self.platform = attributes[:'platform'] end if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'status_code') self.status_code = attributes[:'status_code'] end if attributes.key?(:'error_message') self. = attributes[:'error_message'] end if attributes.key?(:'error_code') self.error_code = attributes[:'error_code'] end if attributes.key?(:'duration_ms') self.duration_ms = attributes[:'duration_ms'] end if attributes.key?(:'endpoint') self.endpoint = attributes[:'endpoint'] end if attributes.key?(:'request_body') self.request_body = attributes[:'request_body'] end if attributes.key?(:'response_body') self.response_body = attributes[:'response_body'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'metadata') self. = attributes[:'metadata'] end if attributes.key?(:'request_id') self.request_id = attributes[:'request_id'] end if attributes.key?(:'api_key_id') self.api_key_id = attributes[:'api_key_id'] end if attributes.key?(:'method') self.method = attributes[:'method'] end if attributes.key?(:'path') self.path = attributes[:'path'] end if attributes.key?(:'ip_address') self.ip_address = attributes[:'ip_address'] end if attributes.key?(:'user_agent') self.user_agent = attributes[:'user_agent'] end end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
28 29 30 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 28 def account_id @account_id end |
#action ⇒ Object
Specific action (post.published, message.sent, account.connected, etc.)
22 23 24 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 22 def action @action end |
#api_key_id ⇒ Object
The API key that made the request (api_request logs)
58 59 60 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 58 def api_key_id @api_key_id end |
#created_at ⇒ Object
Returns the value of attribute created_at.
49 50 51 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 49 def created_at @created_at end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
38 39 40 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 38 def duration_ms @duration_ms end |
#endpoint ⇒ Object
The API endpoint that triggered this log
41 42 43 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 41 def endpoint @endpoint end |
#error_code ⇒ Object
Returns the value of attribute error_code.
36 37 38 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 36 def error_code @error_code end |
#error_message ⇒ Object
Returns the value of attribute error_message.
34 35 36 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 34 def @error_message end |
#ip_address ⇒ Object
Client IP address (api_request logs)
67 68 69 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 67 def ip_address @ip_address end |
#metadata ⇒ Object
Additional context as JSON string
52 53 54 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 52 def @metadata end |
#method ⇒ Object
HTTP method (api_request logs)
61 62 63 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 61 def method @method end |
#path ⇒ Object
Request path (api_request logs)
64 65 66 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 64 def path @path end |
#platform ⇒ Object
Returns the value of attribute platform.
26 27 28 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 26 def platform @platform end |
#request_body ⇒ Object
Request JSON (truncated to 5KB)
44 45 46 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 44 def request_body @request_body end |
#request_id ⇒ Object
Correlation ID linking every log from one API request (api_request logs)
55 56 57 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 55 def request_id @request_id end |
#response_body ⇒ Object
Response JSON (truncated to 10KB)
47 48 49 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 47 def response_body @response_body end |
#status ⇒ Object
Returns the value of attribute status.
30 31 32 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 30 def status @status end |
#status_code ⇒ Object
Returns the value of attribute status_code.
32 33 34 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 32 def status_code @status_code end |
#type ⇒ Object
Log category (publishing, connections, webhooks, messaging)
19 20 21 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 19 def type @type end |
#user_agent ⇒ Object
Client user-agent (api_request logs)
70 71 72 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 70 def user_agent @user_agent end |
#user_id ⇒ Object
Returns the value of attribute user_id.
24 25 26 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 24 def user_id @user_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
122 123 124 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 122 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
127 128 129 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 127 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 95 def self.attribute_map { :'type' => :'type', :'action' => :'action', :'user_id' => :'user_id', :'platform' => :'platform', :'account_id' => :'account_id', :'status' => :'status', :'status_code' => :'status_code', :'error_message' => :'error_message', :'error_code' => :'error_code', :'duration_ms' => :'duration_ms', :'endpoint' => :'endpoint', :'request_body' => :'request_body', :'response_body' => :'response_body', :'created_at' => :'created_at', :'metadata' => :'metadata', :'request_id' => :'request_id', :'api_key_id' => :'api_key_id', :'method' => :'method', :'path' => :'path', :'ip_address' => :'ip_address', :'user_agent' => :'user_agent' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 335 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
159 160 161 162 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 159 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 132 def self.openapi_types { :'type' => :'String', :'action' => :'String', :'user_id' => :'String', :'platform' => :'String', :'account_id' => :'String', :'status' => :'String', :'status_code' => :'Integer', :'error_message' => :'String', :'error_code' => :'String', :'duration_ms' => :'Integer', :'endpoint' => :'String', :'request_body' => :'String', :'response_body' => :'String', :'created_at' => :'Time', :'metadata' => :'String', :'request_id' => :'String', :'api_key_id' => :'String', :'method' => :'String', :'path' => :'String', :'ip_address' => :'String', :'user_agent' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 294 def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type && action == o.action && user_id == o.user_id && platform == o.platform && account_id == o.account_id && status == o.status && status_code == o.status_code && == o. && error_code == o.error_code && duration_ms == o.duration_ms && endpoint == o.endpoint && request_body == o.request_body && response_body == o.response_body && created_at == o.created_at && == o. && request_id == o.request_id && api_key_id == o.api_key_id && method == o.method && path == o.path && ip_address == o.ip_address && user_agent == o.user_agent end |
#eql?(o) ⇒ Boolean
322 323 324 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 322 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
328 329 330 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 328 def hash [type, action, user_id, platform, account_id, status, status_code, , error_code, duration_ms, endpoint, request_body, response_body, created_at, , request_id, api_key_id, method, path, ip_address, user_agent].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
267 268 269 270 271 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 267 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 357 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
275 276 277 278 279 280 |
# File 'lib/zernio-sdk/models/list_logs200_response_logs_inner.rb', line 275 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' status_validator = EnumAttributeValidator.new('String', ["success", "failed", "pending", "skipped"]) return false unless status_validator.valid?(@status) true end |