Class: OCI::Healthchecks::Models::HttpProbeResultSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/healthchecks/models/http_probe_result_summary.rb

Overview

The results returned by running an HTTP probe. All times and durations are returned in milliseconds. All times are relative to the POSIX epoch (1970-01-01T00:00Z). Time properties conform to W3C Resource Timing. For more information, see PerformanceResourceTiming interface.

Constant Summary collapse

ERROR_CATEGORY_ENUM =
[
  ERROR_CATEGORY_NONE = 'NONE'.freeze,
  ERROR_CATEGORY_DNS = 'DNS'.freeze,
  ERROR_CATEGORY_TRANSPORT = 'TRANSPORT'.freeze,
  ERROR_CATEGORY_NETWORK = 'NETWORK'.freeze,
  ERROR_CATEGORY_SYSTEM = 'SYSTEM'.freeze,
  ERROR_CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PROTOCOL_ENUM =
[
  PROTOCOL_HTTP = 'HTTP'.freeze,
  PROTOCOL_HTTPS = 'HTTPS'.freeze,
  PROTOCOL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ HttpProbeResultSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 260

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 }

  self.key = attributes[:'key'] if attributes[:'key']

  self.probe_configuration_id = attributes[:'probeConfigurationId'] if attributes[:'probeConfigurationId']

  raise 'You cannot provide both :probeConfigurationId and :probe_configuration_id' if attributes.key?(:'probeConfigurationId') && attributes.key?(:'probe_configuration_id')

  self.probe_configuration_id = attributes[:'probe_configuration_id'] if attributes[:'probe_configuration_id']

  self.start_time = attributes[:'startTime'] if attributes[:'startTime']

  raise 'You cannot provide both :startTime and :start_time' if attributes.key?(:'startTime') && attributes.key?(:'start_time')

  self.start_time = attributes[:'start_time'] if attributes[:'start_time']

  self.target = attributes[:'target'] if attributes[:'target']

  self.vantage_point_name = attributes[:'vantagePointName'] if attributes[:'vantagePointName']

  raise 'You cannot provide both :vantagePointName and :vantage_point_name' if attributes.key?(:'vantagePointName') && attributes.key?(:'vantage_point_name')

  self.vantage_point_name = attributes[:'vantage_point_name'] if attributes[:'vantage_point_name']

  self.is_timed_out = attributes[:'isTimedOut'] unless attributes[:'isTimedOut'].nil?

  raise 'You cannot provide both :isTimedOut and :is_timed_out' if attributes.key?(:'isTimedOut') && attributes.key?(:'is_timed_out')

  self.is_timed_out = attributes[:'is_timed_out'] unless attributes[:'is_timed_out'].nil?

  self.is_healthy = attributes[:'isHealthy'] unless attributes[:'isHealthy'].nil?

  raise 'You cannot provide both :isHealthy and :is_healthy' if attributes.key?(:'isHealthy') && attributes.key?(:'is_healthy')

  self.is_healthy = attributes[:'is_healthy'] unless attributes[:'is_healthy'].nil?

  self.error_category = attributes[:'errorCategory'] if attributes[:'errorCategory']
  self.error_category = "NONE" if error_category.nil? && !attributes.key?(:'errorCategory') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :errorCategory and :error_category' if attributes.key?(:'errorCategory') && attributes.key?(:'error_category')

  self.error_category = attributes[:'error_category'] if attributes[:'error_category']
  self.error_category = "NONE" if error_category.nil? && !attributes.key?(:'errorCategory') && !attributes.key?(:'error_category') # rubocop:disable Style/StringLiterals

  self.error_message = attributes[:'errorMessage'] if attributes[:'errorMessage']

  raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message')

  self.error_message = attributes[:'error_message'] if attributes[:'error_message']

  self.protocol = attributes[:'protocol'] if attributes[:'protocol']

  self.connection = attributes[:'connection'] if attributes[:'connection']

  self.dns = attributes[:'dns'] if attributes[:'dns']

  self.status_code = attributes[:'statusCode'] if attributes[:'statusCode']

  raise 'You cannot provide both :statusCode and :status_code' if attributes.key?(:'statusCode') && attributes.key?(:'status_code')

  self.status_code = attributes[:'status_code'] if attributes[:'status_code']

  self.domain_lookup_start = attributes[:'domainLookupStart'] if attributes[:'domainLookupStart']

  raise 'You cannot provide both :domainLookupStart and :domain_lookup_start' if attributes.key?(:'domainLookupStart') && attributes.key?(:'domain_lookup_start')

  self.domain_lookup_start = attributes[:'domain_lookup_start'] if attributes[:'domain_lookup_start']

  self.domain_lookup_end = attributes[:'domainLookupEnd'] if attributes[:'domainLookupEnd']

  raise 'You cannot provide both :domainLookupEnd and :domain_lookup_end' if attributes.key?(:'domainLookupEnd') && attributes.key?(:'domain_lookup_end')

  self.domain_lookup_end = attributes[:'domain_lookup_end'] if attributes[:'domain_lookup_end']

  self.connect_start = attributes[:'connectStart'] if attributes[:'connectStart']

  raise 'You cannot provide both :connectStart and :connect_start' if attributes.key?(:'connectStart') && attributes.key?(:'connect_start')

  self.connect_start = attributes[:'connect_start'] if attributes[:'connect_start']

  self.secure_connection_start = attributes[:'secureConnectionStart'] if attributes[:'secureConnectionStart']

  raise 'You cannot provide both :secureConnectionStart and :secure_connection_start' if attributes.key?(:'secureConnectionStart') && attributes.key?(:'secure_connection_start')

  self.secure_connection_start = attributes[:'secure_connection_start'] if attributes[:'secure_connection_start']

  self.connect_end = attributes[:'connectEnd'] if attributes[:'connectEnd']

  raise 'You cannot provide both :connectEnd and :connect_end' if attributes.key?(:'connectEnd') && attributes.key?(:'connect_end')

  self.connect_end = attributes[:'connect_end'] if attributes[:'connect_end']

  self.fetch_start = attributes[:'fetchStart'] if attributes[:'fetchStart']

  raise 'You cannot provide both :fetchStart and :fetch_start' if attributes.key?(:'fetchStart') && attributes.key?(:'fetch_start')

  self.fetch_start = attributes[:'fetch_start'] if attributes[:'fetch_start']

  self.request_start = attributes[:'requestStart'] if attributes[:'requestStart']

  raise 'You cannot provide both :requestStart and :request_start' if attributes.key?(:'requestStart') && attributes.key?(:'request_start')

  self.request_start = attributes[:'request_start'] if attributes[:'request_start']

  self.response_start = attributes[:'responseStart'] if attributes[:'responseStart']

  raise 'You cannot provide both :responseStart and :response_start' if attributes.key?(:'responseStart') && attributes.key?(:'response_start')

  self.response_start = attributes[:'response_start'] if attributes[:'response_start']

  self.response_end = attributes[:'responseEnd'] if attributes[:'responseEnd']

  raise 'You cannot provide both :responseEnd and :response_end' if attributes.key?(:'responseEnd') && attributes.key?(:'response_end')

  self.response_end = attributes[:'response_end'] if attributes[:'response_end']

  self.duration = attributes[:'duration'] if attributes[:'duration']

  self.encoded_body_size = attributes[:'encodedBodySize'] if attributes[:'encodedBodySize']

  raise 'You cannot provide both :encodedBodySize and :encoded_body_size' if attributes.key?(:'encodedBodySize') && attributes.key?(:'encoded_body_size')

  self.encoded_body_size = attributes[:'encoded_body_size'] if attributes[:'encoded_body_size']
end

Instance Attribute Details

#connect_endFloat

The time immediately after the vantage point finishes establishing the connection to the server to retrieve the resource.

Returns:

  • (Float)


129
130
131
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 129

def connect_end
  @connect_end
end

#connect_startFloat

The time immediately before the vantage point starts establishing the connection to the server to retrieve the resource.

Returns:

  • (Float)


117
118
119
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 117

def connect_start
  @connect_start
end

#connectionOCI::Healthchecks::Models::TcpConnection



92
93
94
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 92

def connection
  @connection
end

#dnsOCI::Healthchecks::Models::DNS



95
96
97
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 95

def dns
  @dns
end

#domain_lookup_endFloat

The time immediately before the vantage point finishes the domain name lookup for the resource.

Returns:

  • (Float)


111
112
113
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 111

def domain_lookup_end
  @domain_lookup_end
end

#domain_lookup_startFloat

The time immediately before the vantage point starts the domain name lookup for the resource.

Returns:

  • (Float)


105
106
107
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 105

def domain_lookup_start
  @domain_lookup_start
end

#durationFloat

The total duration from start of request until response is fully consumed or the connection is closed.

Returns:

  • (Float)


158
159
160
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 158

def duration
  @duration
end

#encoded_body_sizeInteger

The size, in octets, of the payload body prior to removing any applied content-codings.

Returns:

  • (Integer)


164
165
166
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 164

def encoded_body_size
  @encoded_body_size
end

#error_categoryString

The category of error if an error occurs executing the probe. The errorMessage field provides a message with the error details. * NONE - No error * DNS - DNS errors * TRANSPORT - Transport-related errors, for example a "TLS certificate expired" error. * NETWORK - Network-related errors, for example a "network unreachable" error. * SYSTEM - Internal system errors.

Returns:

  • (String)


82
83
84
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 82

def error_category
  @error_category
end

#error_messageString

The error information indicating why a probe execution failed.

Returns:

  • (String)


86
87
88
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 86

def error_message
  @error_message
end

#fetch_startFloat

The time immediately before the vantage point starts to fetch the resource.

Returns:

  • (Float)


134
135
136
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 134

def fetch_start
  @fetch_start
end

#is_healthyBOOLEAN

True if the probe result is determined to be healthy based on probe type-specific criteria. For HTTP probes, a probe result is considered healthy if the HTTP response code is greater than or equal to 200 and less than 300.

Returns:

  • (BOOLEAN)


71
72
73
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 71

def is_healthy
  @is_healthy
end

#is_timed_outBOOLEAN

True if the probe did not complete before the configured timeoutInSeconds value.

Returns:

  • (BOOLEAN)


63
64
65
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 63

def is_timed_out
  @is_timed_out
end

#keyString

A value identifying this specific probe result. The key is only unique within the results of its probe configuration. The key may be reused after 90 days.

Returns:

  • (String)


37
38
39
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 37

def key
  @key
end

#probe_configuration_idString

The OCID of the monitor or on-demand probe responsible for creating this result.

Returns:

  • (String)


42
43
44
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 42

def probe_configuration_id
  @probe_configuration_id
end

#protocolString

Returns:

  • (String)


89
90
91
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 89

def protocol
  @protocol
end

#request_startFloat

The time immediately before the vantage point starts requesting the resource from the server.

Returns:

  • (Float)


140
141
142
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 140

def request_start
  @request_start
end

#response_endFloat

The time immediately after the vantage point receives the last byte of the response or immediately before the transport connection is closed, whichever comes first.

Returns:

  • (Float)


152
153
154
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 152

def response_end
  @response_end
end

#response_startFloat

The time immediately after the vantage point's HTTP parser receives the first byte of the response.

Returns:

  • (Float)


146
147
148
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 146

def response_start
  @response_start
end

#secure_connection_startFloat

The time immediately before the vantage point starts the handshake process to secure the current connection.

Returns:

  • (Float)


123
124
125
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 123

def secure_connection_start
  @secure_connection_start
end

#start_timeFloat

The date and time the probe was executed, expressed in milliseconds since the POSIX epoch. This field is defined by the PerformanceResourceTiming interface of the W3C Resource Timing specification. For more information, see Resource Timing.

Returns:

  • (Float)


50
51
52
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 50

def start_time
  @start_time
end

#status_codeInteger

The HTTP response status code.

Returns:

  • (Integer)


99
100
101
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 99

def status_code
  @status_code
end

#targetString

The target hostname or IP address of the probe.

Returns:

  • (String)


54
55
56
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 54

def target
  @target
end

#vantage_point_nameString

The name of the vantage point that executed the probe.

Returns:

  • (String)


58
59
60
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 58

def vantage_point_name
  @vantage_point_name
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 167

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'probe_configuration_id': :'probeConfigurationId',
    'start_time': :'startTime',
    'target': :'target',
    'vantage_point_name': :'vantagePointName',
    'is_timed_out': :'isTimedOut',
    'is_healthy': :'isHealthy',
    'error_category': :'errorCategory',
    'error_message': :'errorMessage',
    'protocol': :'protocol',
    'connection': :'connection',
    'dns': :'dns',
    'status_code': :'statusCode',
    'domain_lookup_start': :'domainLookupStart',
    'domain_lookup_end': :'domainLookupEnd',
    'connect_start': :'connectStart',
    'secure_connection_start': :'secureConnectionStart',
    'connect_end': :'connectEnd',
    'fetch_start': :'fetchStart',
    'request_start': :'requestStart',
    'response_start': :'responseStart',
    'response_end': :'responseEnd',
    'duration': :'duration',
    'encoded_body_size': :'encodedBodySize'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 199

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'probe_configuration_id': :'String',
    'start_time': :'Float',
    'target': :'String',
    'vantage_point_name': :'String',
    'is_timed_out': :'BOOLEAN',
    'is_healthy': :'BOOLEAN',
    'error_category': :'String',
    'error_message': :'String',
    'protocol': :'String',
    'connection': :'OCI::Healthchecks::Models::TcpConnection',
    'dns': :'OCI::Healthchecks::Models::DNS',
    'status_code': :'Integer',
    'domain_lookup_start': :'Float',
    'domain_lookup_end': :'Float',
    'connect_start': :'Float',
    'secure_connection_start': :'Float',
    'connect_end': :'Float',
    'fetch_start': :'Float',
    'request_start': :'Float',
    'response_start': :'Float',
    'response_end': :'Float',
    'duration': :'Float',
    'encoded_body_size': :'Integer'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 422

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    key == other.key &&
    probe_configuration_id == other.probe_configuration_id &&
    start_time == other.start_time &&
    target == other.target &&
    vantage_point_name == other.vantage_point_name &&
    is_timed_out == other.is_timed_out &&
    is_healthy == other.is_healthy &&
    error_category == other.error_category &&
    error_message == other.error_message &&
    protocol == other.protocol &&
    connection == other.connection &&
    dns == other.dns &&
    status_code == other.status_code &&
    domain_lookup_start == other.domain_lookup_start &&
    domain_lookup_end == other.domain_lookup_end &&
    connect_start == other.connect_start &&
    secure_connection_start == other.secure_connection_start &&
    connect_end == other.connect_end &&
    fetch_start == other.fetch_start &&
    request_start == other.request_start &&
    response_start == other.response_start &&
    response_end == other.response_end &&
    duration == other.duration &&
    encoded_body_size == other.encoded_body_size
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 475

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)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      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) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


455
456
457
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 455

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



464
465
466
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 464

def hash
  [key, probe_configuration_id, start_time, target, vantage_point_name, is_timed_out, is_healthy, error_category, error_message, protocol, connection, dns, status_code, domain_lookup_start, domain_lookup_end, connect_start, secure_connection_start, connect_end, fetch_start, request_start, response_start, response_end, duration, encoded_body_size].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



508
509
510
511
512
513
514
515
516
517
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 508

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



502
503
504
# File 'lib/oci/healthchecks/models/http_probe_result_summary.rb', line 502

def to_s
  to_hash.to_s
end