oci 2.4.6 → 2.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/lib/oci.rb +2 -0
  4. data/lib/oci/database/database.rb +1 -0
  5. data/lib/oci/database/models/database.rb +18 -4
  6. data/lib/oci/database/models/database_connection_strings.rb +182 -0
  7. data/lib/oci/database/models/database_summary.rb +18 -4
  8. data/lib/oci/dns/dns.rb +23 -0
  9. data/lib/oci/dns/dns_client.rb +802 -75
  10. data/lib/oci/dns/dns_client_composite_operations.rb +238 -0
  11. data/lib/oci/dns/models/create_steering_policy_attachment_details.rb +205 -0
  12. data/lib/oci/dns/models/create_steering_policy_details.rb +333 -0
  13. data/lib/oci/dns/models/steering_policy.rb +418 -0
  14. data/lib/oci/dns/models/steering_policy_answer.rb +205 -0
  15. data/lib/oci/dns/models/steering_policy_attachment.rb +308 -0
  16. data/lib/oci/dns/models/steering_policy_attachment_summary.rb +304 -0
  17. data/lib/oci/dns/models/steering_policy_filter_answer_data.rb +168 -0
  18. data/lib/oci/dns/models/steering_policy_filter_rule.rb +178 -0
  19. data/lib/oci/dns/models/steering_policy_filter_rule_case.rb +165 -0
  20. data/lib/oci/dns/models/steering_policy_health_rule.rb +160 -0
  21. data/lib/oci/dns/models/steering_policy_health_rule_case.rb +152 -0
  22. data/lib/oci/dns/models/steering_policy_limit_rule.rb +179 -0
  23. data/lib/oci/dns/models/steering_policy_limit_rule_case.rb +162 -0
  24. data/lib/oci/dns/models/steering_policy_priority_answer_data.rb +161 -0
  25. data/lib/oci/dns/models/steering_policy_priority_rule.rb +178 -0
  26. data/lib/oci/dns/models/steering_policy_priority_rule_case.rb +165 -0
  27. data/lib/oci/dns/models/steering_policy_rule.rb +237 -0
  28. data/lib/oci/dns/models/steering_policy_summary.rb +391 -0
  29. data/lib/oci/dns/models/steering_policy_weighted_answer_data.rb +161 -0
  30. data/lib/oci/dns/models/steering_policy_weighted_rule.rb +178 -0
  31. data/lib/oci/dns/models/steering_policy_weighted_rule_case.rb +165 -0
  32. data/lib/oci/dns/models/update_steering_policy_attachment_details.rb +156 -0
  33. data/lib/oci/dns/models/update_steering_policy_details.rb +319 -0
  34. data/lib/oci/email/email.rb +1 -0
  35. data/lib/oci/email/email_client.rb +87 -16
  36. data/lib/oci/email/email_client_composite_operations.rb +40 -0
  37. data/lib/oci/email/models/create_sender_details.rb +40 -6
  38. data/lib/oci/email/models/create_suppression_details.rb +2 -2
  39. data/lib/oci/email/models/sender.rb +53 -5
  40. data/lib/oci/email/models/sender_summary.rb +38 -4
  41. data/lib/oci/email/models/suppression.rb +20 -3
  42. data/lib/oci/email/models/update_sender_details.rb +174 -0
  43. data/lib/oci/healthchecks/health_checks_client.rb +1137 -0
  44. data/lib/oci/healthchecks/health_checks_client_composite_operations.rb +24 -0
  45. data/lib/oci/healthchecks/healthchecks.rb +41 -0
  46. data/lib/oci/healthchecks/models/connection.rb +159 -0
  47. data/lib/oci/healthchecks/models/create_http_monitor_details.rb +359 -0
  48. data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +278 -0
  49. data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +229 -0
  50. data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +310 -0
  51. data/lib/oci/healthchecks/models/dns.rb +165 -0
  52. data/lib/oci/healthchecks/models/geolocation.rb +239 -0
  53. data/lib/oci/healthchecks/models/health_checks_vantage_point_summary.rb +211 -0
  54. data/lib/oci/healthchecks/models/http_monitor.rb +395 -0
  55. data/lib/oci/healthchecks/models/http_monitor_summary.rb +290 -0
  56. data/lib/oci/healthchecks/models/http_probe.rb +314 -0
  57. data/lib/oci/healthchecks/models/http_probe_method.rb +10 -0
  58. data/lib/oci/healthchecks/models/http_probe_protocol.rb +10 -0
  59. data/lib/oci/healthchecks/models/http_probe_result_summary.rb +542 -0
  60. data/lib/oci/healthchecks/models/ping_monitor.rb +340 -0
  61. data/lib/oci/healthchecks/models/ping_monitor_summary.rb +290 -0
  62. data/lib/oci/healthchecks/models/ping_probe.rb +259 -0
  63. data/lib/oci/healthchecks/models/ping_probe_protocol.rb +10 -0
  64. data/lib/oci/healthchecks/models/ping_probe_result_summary.rb +418 -0
  65. data/lib/oci/healthchecks/models/routing.rb +192 -0
  66. data/lib/oci/healthchecks/models/tcp_connection.rb +189 -0
  67. data/lib/oci/healthchecks/models/update_http_monitor_details.rb +339 -0
  68. data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +292 -0
  69. data/lib/oci/healthchecks/util.rb +2 -0
  70. data/lib/oci/regions.rb +3 -1
  71. data/lib/oci/version.rb +1 -1
  72. data/lib/oci/waas/models/access_rule.rb +283 -0
  73. data/lib/oci/waas/models/access_rule_criteria.rb +206 -0
  74. data/lib/oci/waas/models/address_rate_limiting.rb +195 -0
  75. data/lib/oci/waas/models/block_challenge_settings.rb +288 -0
  76. data/lib/oci/waas/models/captcha.rb +231 -0
  77. data/lib/oci/waas/models/certificate.rb +383 -0
  78. data/lib/oci/waas/models/certificate_extensions.rb +170 -0
  79. data/lib/oci/waas/models/certificate_public_key_info.rb +170 -0
  80. data/lib/oci/waas/models/certificate_subject_name.rb +218 -0
  81. data/lib/oci/waas/models/certificate_summary.rb +274 -0
  82. data/lib/oci/waas/models/create_certificate_details.rb +241 -0
  83. data/lib/oci/waas/models/create_waas_policy_details.rb +257 -0
  84. data/lib/oci/waas/models/device_fingerprint_challenge.rb +268 -0
  85. data/lib/oci/waas/models/edge_subnet.rb +173 -0
  86. data/lib/oci/waas/models/good_bot.rb +183 -0
  87. data/lib/oci/waas/models/header.rb +159 -0
  88. data/lib/oci/waas/models/human_interaction_challenge.rb +282 -0
  89. data/lib/oci/waas/models/js_challenge.rb +240 -0
  90. data/lib/oci/waas/models/lifecycle_states.rb +14 -0
  91. data/lib/oci/waas/models/origin.rb +191 -0
  92. data/lib/oci/waas/models/policy_config.rb +181 -0
  93. data/lib/oci/waas/models/protection_rule.rb +237 -0
  94. data/lib/oci/waas/models/protection_rule_action.rb +185 -0
  95. data/lib/oci/waas/models/protection_rule_exclusion.rb +182 -0
  96. data/lib/oci/waas/models/protection_settings.rb +404 -0
  97. data/lib/oci/waas/models/recommendation.rb +210 -0
  98. data/lib/oci/waas/models/threat_feed.rb +202 -0
  99. data/lib/oci/waas/models/threat_feed_action.rb +175 -0
  100. data/lib/oci/waas/models/update_certificate_details.rb +183 -0
  101. data/lib/oci/waas/models/update_waas_policy_details.rb +233 -0
  102. data/lib/oci/waas/models/waas_policy.rb +331 -0
  103. data/lib/oci/waas/models/waas_policy_summary.rb +271 -0
  104. data/lib/oci/waas/models/waf_blocked_request.rb +219 -0
  105. data/lib/oci/waas/models/waf_config.rb +295 -0
  106. data/lib/oci/waas/models/waf_config_details.rb +253 -0
  107. data/lib/oci/waas/models/waf_log.rb +510 -0
  108. data/lib/oci/waas/models/waf_meter_datum.rb +279 -0
  109. data/lib/oci/waas/models/waf_request.rb +177 -0
  110. data/lib/oci/waas/models/waf_traffic_datum.rb +223 -0
  111. data/lib/oci/waas/models/whitelist.rb +159 -0
  112. data/lib/oci/waas/models/work_request.rb +322 -0
  113. data/lib/oci/waas/models/work_request_error.rb +170 -0
  114. data/lib/oci/waas/models/work_request_log_entry.rb +159 -0
  115. data/lib/oci/waas/models/work_request_operation_types.rb +12 -0
  116. data/lib/oci/waas/models/work_request_resource.rb +217 -0
  117. data/lib/oci/waas/models/work_request_status_values.rb +14 -0
  118. data/lib/oci/waas/models/work_request_summary.rb +302 -0
  119. data/lib/oci/waas/util.rb +2 -0
  120. data/lib/oci/waas/waas.rb +66 -0
  121. data/lib/oci/waas/waas_client.rb +3044 -0
  122. data/lib/oci/waas/waas_client_composite_operations.rb +990 -0
  123. metadata +105 -2
@@ -0,0 +1,10 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ module OCI
4
+ module Healthchecks::Models
5
+ HTTP_PROBE_METHOD_ENUM = [
6
+ HTTP_PROBE_METHOD_GET = 'GET'.freeze,
7
+ HTTP_PROBE_METHOD_HEAD = 'HEAD'.freeze
8
+ ].freeze
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ module OCI
4
+ module Healthchecks::Models
5
+ HTTP_PROBE_PROTOCOL_ENUM = [
6
+ HTTP_PROBE_PROTOCOL_HTTP = 'HTTP'.freeze,
7
+ HTTP_PROBE_PROTOCOL_HTTPS = 'HTTPS'.freeze
8
+ ].freeze
9
+ end
10
+ end
@@ -0,0 +1,542 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require 'logger'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective
7
+ module OCI
8
+ # The results returned by running an HTTP probe. All times and durations are
9
+ # returned in milliseconds. All times are relative to the POSIX epoch
10
+ # (1970-01-01T00:00Z). Time properties conform to W3C Resource Timing.
11
+ # For more information, see
12
+ # [PerformanceResourceTiming](https://w3c.github.io/resource-timing/#sec-resource-timing)
13
+ # interface.
14
+ #
15
+ class Healthchecks::Models::HttpProbeResultSummary # rubocop:disable Metrics/LineLength
16
+ ERROR_CATEGORY_ENUM = [
17
+ ERROR_CATEGORY_NONE = 'NONE'.freeze,
18
+ ERROR_CATEGORY_DNS = 'DNS'.freeze,
19
+ ERROR_CATEGORY_TRANSPORT = 'TRANSPORT'.freeze,
20
+ ERROR_CATEGORY_NETWORK = 'NETWORK'.freeze,
21
+ ERROR_CATEGORY_SYSTEM = 'SYSTEM'.freeze,
22
+ ERROR_CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
23
+ ].freeze
24
+
25
+ PROTOCOL_ENUM = [
26
+ PROTOCOL_HTTP = 'HTTP'.freeze,
27
+ PROTOCOL_HTTPS = 'HTTPS'.freeze,
28
+ PROTOCOL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
29
+ ].freeze
30
+
31
+ # A value identifying this specific probe result. The key is only unique within
32
+ # the results of its probe configuration. The key may be reused after 90 days.
33
+ #
34
+ # @return [String]
35
+ attr_accessor :key
36
+
37
+ # The OCID of the monitor or on-demand probe responsible for creating this result.
38
+ #
39
+ # @return [String]
40
+ attr_accessor :probe_configuration_id
41
+
42
+ # The date and time the probe was executed, expressed in milliseconds since the
43
+ # POSIX epoch. This field is defined by the PerformanceResourceTiming interface
44
+ # of the W3C Resource Timing specification. For more information, see
45
+ # [Resource Timing](https://w3c.github.io/resource-timing/#sec-resource-timing).
46
+ #
47
+ # @return [Float]
48
+ attr_accessor :start_time
49
+
50
+ # The target hostname or IP address of the probe.
51
+ # @return [String]
52
+ attr_accessor :target
53
+
54
+ # The name of the vantage point that executed the probe.
55
+ # @return [String]
56
+ attr_accessor :vantage_point_name
57
+
58
+ # True if the probe did not complete before the configured `timeoutInSeconds` value.
59
+ #
60
+ # @return [BOOLEAN]
61
+ attr_accessor :is_timed_out
62
+
63
+ # True if the probe result is determined to be healthy based on probe
64
+ # type-specific criteria. For HTTP probes, a probe result is considered
65
+ # healthy if the HTTP response code is greater than or equal to 200 and
66
+ # less than 300.
67
+ #
68
+ # @return [BOOLEAN]
69
+ attr_accessor :is_healthy
70
+
71
+ # The category of error if an error occurs executing the probe.
72
+ # The `errorMessage` field provides a message with the error details.
73
+ # * NONE - No error
74
+ # * DNS - DNS errors
75
+ # * TRANSPORT - Transport-related errors, for example a \"TLS certificate expired\" error.
76
+ # * NETWORK - Network-related errors, for example a \"network unreachable\" error.
77
+ # * SYSTEM - Internal system errors.
78
+ #
79
+ # @return [String]
80
+ attr_reader :error_category
81
+
82
+ # The error information indicating why a probe execution failed.
83
+ # @return [String]
84
+ attr_accessor :error_message
85
+
86
+ # @return [String]
87
+ attr_reader :protocol
88
+
89
+ # @return [OCI::Healthchecks::Models::TcpConnection]
90
+ attr_accessor :connection
91
+
92
+ # @return [OCI::Healthchecks::Models::DNS]
93
+ attr_accessor :dns
94
+
95
+ # The HTTP response status code.
96
+ # @return [Integer]
97
+ attr_accessor :status_code
98
+
99
+ # The time immediately before the vantage point starts the domain name lookup for
100
+ # the resource.
101
+ #
102
+ # @return [Float]
103
+ attr_accessor :domain_lookup_start
104
+
105
+ # The time immediately before the vantage point finishes the domain name lookup for
106
+ # the resource.
107
+ #
108
+ # @return [Float]
109
+ attr_accessor :domain_lookup_end
110
+
111
+ # The time immediately before the vantage point starts establishing the connection
112
+ # to the server to retrieve the resource.
113
+ #
114
+ # @return [Float]
115
+ attr_accessor :connect_start
116
+
117
+ # The time immediately before the vantage point starts the handshake process to
118
+ # secure the current connection.
119
+ #
120
+ # @return [Float]
121
+ attr_accessor :secure_connection_start
122
+
123
+ # The time immediately after the vantage point finishes establishing the connection
124
+ # to the server to retrieve the resource.
125
+ #
126
+ # @return [Float]
127
+ attr_accessor :connect_end
128
+
129
+ # The time immediately before the vantage point starts to fetch the resource.
130
+ #
131
+ # @return [Float]
132
+ attr_accessor :fetch_start
133
+
134
+ # The time immediately before the vantage point starts requesting the resource from
135
+ # the server.
136
+ #
137
+ # @return [Float]
138
+ attr_accessor :request_start
139
+
140
+ # The time immediately after the vantage point's HTTP parser receives the first byte
141
+ # of the response.
142
+ #
143
+ # @return [Float]
144
+ attr_accessor :response_start
145
+
146
+ # The time immediately after the vantage point receives the last byte of the response
147
+ # or immediately before the transport connection is closed, whichever comes first.
148
+ #
149
+ # @return [Float]
150
+ attr_accessor :response_end
151
+
152
+ # The total duration from start of request until response is fully consumed or the
153
+ # connection is closed.
154
+ #
155
+ # @return [Float]
156
+ attr_accessor :duration
157
+
158
+ # The size, in octets, of the payload body prior to removing any applied
159
+ # content-codings.
160
+ #
161
+ # @return [Integer]
162
+ attr_accessor :encoded_body_size
163
+
164
+ # Attribute mapping from ruby-style variable name to JSON key.
165
+ def self.attribute_map
166
+ {
167
+ # rubocop:disable Style/SymbolLiteral
168
+ 'key': :'key',
169
+ 'probe_configuration_id': :'probeConfigurationId',
170
+ 'start_time': :'startTime',
171
+ 'target': :'target',
172
+ 'vantage_point_name': :'vantagePointName',
173
+ 'is_timed_out': :'isTimedOut',
174
+ 'is_healthy': :'isHealthy',
175
+ 'error_category': :'errorCategory',
176
+ 'error_message': :'errorMessage',
177
+ 'protocol': :'protocol',
178
+ 'connection': :'connection',
179
+ 'dns': :'dns',
180
+ 'status_code': :'statusCode',
181
+ 'domain_lookup_start': :'domainLookupStart',
182
+ 'domain_lookup_end': :'domainLookupEnd',
183
+ 'connect_start': :'connectStart',
184
+ 'secure_connection_start': :'secureConnectionStart',
185
+ 'connect_end': :'connectEnd',
186
+ 'fetch_start': :'fetchStart',
187
+ 'request_start': :'requestStart',
188
+ 'response_start': :'responseStart',
189
+ 'response_end': :'responseEnd',
190
+ 'duration': :'duration',
191
+ 'encoded_body_size': :'encodedBodySize'
192
+ # rubocop:enable Style/SymbolLiteral
193
+ }
194
+ end
195
+
196
+ # Attribute type mapping.
197
+ def self.swagger_types
198
+ {
199
+ # rubocop:disable Style/SymbolLiteral
200
+ 'key': :'String',
201
+ 'probe_configuration_id': :'String',
202
+ 'start_time': :'Float',
203
+ 'target': :'String',
204
+ 'vantage_point_name': :'String',
205
+ 'is_timed_out': :'BOOLEAN',
206
+ 'is_healthy': :'BOOLEAN',
207
+ 'error_category': :'String',
208
+ 'error_message': :'String',
209
+ 'protocol': :'String',
210
+ 'connection': :'OCI::Healthchecks::Models::TcpConnection',
211
+ 'dns': :'OCI::Healthchecks::Models::DNS',
212
+ 'status_code': :'Integer',
213
+ 'domain_lookup_start': :'Float',
214
+ 'domain_lookup_end': :'Float',
215
+ 'connect_start': :'Float',
216
+ 'secure_connection_start': :'Float',
217
+ 'connect_end': :'Float',
218
+ 'fetch_start': :'Float',
219
+ 'request_start': :'Float',
220
+ 'response_start': :'Float',
221
+ 'response_end': :'Float',
222
+ 'duration': :'Float',
223
+ 'encoded_body_size': :'Integer'
224
+ # rubocop:enable Style/SymbolLiteral
225
+ }
226
+ end
227
+
228
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
229
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
230
+
231
+
232
+ # Initializes the object
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @option attributes [String] :key The value to assign to the {#key} property
235
+ # @option attributes [String] :probe_configuration_id The value to assign to the {#probe_configuration_id} property
236
+ # @option attributes [Float] :start_time The value to assign to the {#start_time} property
237
+ # @option attributes [String] :target The value to assign to the {#target} property
238
+ # @option attributes [String] :vantage_point_name The value to assign to the {#vantage_point_name} property
239
+ # @option attributes [BOOLEAN] :is_timed_out The value to assign to the {#is_timed_out} property
240
+ # @option attributes [BOOLEAN] :is_healthy The value to assign to the {#is_healthy} property
241
+ # @option attributes [String] :error_category The value to assign to the {#error_category} property
242
+ # @option attributes [String] :error_message The value to assign to the {#error_message} property
243
+ # @option attributes [String] :protocol The value to assign to the {#protocol} property
244
+ # @option attributes [OCI::Healthchecks::Models::TcpConnection] :connection The value to assign to the {#connection} property
245
+ # @option attributes [OCI::Healthchecks::Models::DNS] :dns The value to assign to the {#dns} property
246
+ # @option attributes [Integer] :status_code The value to assign to the {#status_code} property
247
+ # @option attributes [Float] :domain_lookup_start The value to assign to the {#domain_lookup_start} property
248
+ # @option attributes [Float] :domain_lookup_end The value to assign to the {#domain_lookup_end} property
249
+ # @option attributes [Float] :connect_start The value to assign to the {#connect_start} property
250
+ # @option attributes [Float] :secure_connection_start The value to assign to the {#secure_connection_start} property
251
+ # @option attributes [Float] :connect_end The value to assign to the {#connect_end} property
252
+ # @option attributes [Float] :fetch_start The value to assign to the {#fetch_start} property
253
+ # @option attributes [Float] :request_start The value to assign to the {#request_start} property
254
+ # @option attributes [Float] :response_start The value to assign to the {#response_start} property
255
+ # @option attributes [Float] :response_end The value to assign to the {#response_end} property
256
+ # @option attributes [Float] :duration The value to assign to the {#duration} property
257
+ # @option attributes [Integer] :encoded_body_size The value to assign to the {#encoded_body_size} property
258
+ def initialize(attributes = {})
259
+ return unless attributes.is_a?(Hash)
260
+
261
+ # convert string to symbol for hash key
262
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
263
+
264
+ self.key = attributes[:'key'] if attributes[:'key']
265
+
266
+ self.probe_configuration_id = attributes[:'probeConfigurationId'] if attributes[:'probeConfigurationId']
267
+
268
+ raise 'You cannot provide both :probeConfigurationId and :probe_configuration_id' if attributes.key?(:'probeConfigurationId') && attributes.key?(:'probe_configuration_id')
269
+
270
+ self.probe_configuration_id = attributes[:'probe_configuration_id'] if attributes[:'probe_configuration_id']
271
+
272
+ self.start_time = attributes[:'startTime'] if attributes[:'startTime']
273
+
274
+ raise 'You cannot provide both :startTime and :start_time' if attributes.key?(:'startTime') && attributes.key?(:'start_time')
275
+
276
+ self.start_time = attributes[:'start_time'] if attributes[:'start_time']
277
+
278
+ self.target = attributes[:'target'] if attributes[:'target']
279
+
280
+ self.vantage_point_name = attributes[:'vantagePointName'] if attributes[:'vantagePointName']
281
+
282
+ raise 'You cannot provide both :vantagePointName and :vantage_point_name' if attributes.key?(:'vantagePointName') && attributes.key?(:'vantage_point_name')
283
+
284
+ self.vantage_point_name = attributes[:'vantage_point_name'] if attributes[:'vantage_point_name']
285
+
286
+ self.is_timed_out = attributes[:'isTimedOut'] unless attributes[:'isTimedOut'].nil?
287
+
288
+ raise 'You cannot provide both :isTimedOut and :is_timed_out' if attributes.key?(:'isTimedOut') && attributes.key?(:'is_timed_out')
289
+
290
+ self.is_timed_out = attributes[:'is_timed_out'] unless attributes[:'is_timed_out'].nil?
291
+
292
+ self.is_healthy = attributes[:'isHealthy'] unless attributes[:'isHealthy'].nil?
293
+
294
+ raise 'You cannot provide both :isHealthy and :is_healthy' if attributes.key?(:'isHealthy') && attributes.key?(:'is_healthy')
295
+
296
+ self.is_healthy = attributes[:'is_healthy'] unless attributes[:'is_healthy'].nil?
297
+
298
+ self.error_category = attributes[:'errorCategory'] if attributes[:'errorCategory']
299
+ self.error_category = "NONE" if error_category.nil? && !attributes.key?(:'errorCategory') # rubocop:disable Style/StringLiterals
300
+
301
+ raise 'You cannot provide both :errorCategory and :error_category' if attributes.key?(:'errorCategory') && attributes.key?(:'error_category')
302
+
303
+ self.error_category = attributes[:'error_category'] if attributes[:'error_category']
304
+ self.error_category = "NONE" if error_category.nil? && !attributes.key?(:'errorCategory') && !attributes.key?(:'error_category') # rubocop:disable Style/StringLiterals
305
+
306
+ self.error_message = attributes[:'errorMessage'] if attributes[:'errorMessage']
307
+
308
+ raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message')
309
+
310
+ self.error_message = attributes[:'error_message'] if attributes[:'error_message']
311
+
312
+ self.protocol = attributes[:'protocol'] if attributes[:'protocol']
313
+
314
+ self.connection = attributes[:'connection'] if attributes[:'connection']
315
+
316
+ self.dns = attributes[:'dns'] if attributes[:'dns']
317
+
318
+ self.status_code = attributes[:'statusCode'] if attributes[:'statusCode']
319
+
320
+ raise 'You cannot provide both :statusCode and :status_code' if attributes.key?(:'statusCode') && attributes.key?(:'status_code')
321
+
322
+ self.status_code = attributes[:'status_code'] if attributes[:'status_code']
323
+
324
+ self.domain_lookup_start = attributes[:'domainLookupStart'] if attributes[:'domainLookupStart']
325
+
326
+ raise 'You cannot provide both :domainLookupStart and :domain_lookup_start' if attributes.key?(:'domainLookupStart') && attributes.key?(:'domain_lookup_start')
327
+
328
+ self.domain_lookup_start = attributes[:'domain_lookup_start'] if attributes[:'domain_lookup_start']
329
+
330
+ self.domain_lookup_end = attributes[:'domainLookupEnd'] if attributes[:'domainLookupEnd']
331
+
332
+ raise 'You cannot provide both :domainLookupEnd and :domain_lookup_end' if attributes.key?(:'domainLookupEnd') && attributes.key?(:'domain_lookup_end')
333
+
334
+ self.domain_lookup_end = attributes[:'domain_lookup_end'] if attributes[:'domain_lookup_end']
335
+
336
+ self.connect_start = attributes[:'connectStart'] if attributes[:'connectStart']
337
+
338
+ raise 'You cannot provide both :connectStart and :connect_start' if attributes.key?(:'connectStart') && attributes.key?(:'connect_start')
339
+
340
+ self.connect_start = attributes[:'connect_start'] if attributes[:'connect_start']
341
+
342
+ self.secure_connection_start = attributes[:'secureConnectionStart'] if attributes[:'secureConnectionStart']
343
+
344
+ raise 'You cannot provide both :secureConnectionStart and :secure_connection_start' if attributes.key?(:'secureConnectionStart') && attributes.key?(:'secure_connection_start')
345
+
346
+ self.secure_connection_start = attributes[:'secure_connection_start'] if attributes[:'secure_connection_start']
347
+
348
+ self.connect_end = attributes[:'connectEnd'] if attributes[:'connectEnd']
349
+
350
+ raise 'You cannot provide both :connectEnd and :connect_end' if attributes.key?(:'connectEnd') && attributes.key?(:'connect_end')
351
+
352
+ self.connect_end = attributes[:'connect_end'] if attributes[:'connect_end']
353
+
354
+ self.fetch_start = attributes[:'fetchStart'] if attributes[:'fetchStart']
355
+
356
+ raise 'You cannot provide both :fetchStart and :fetch_start' if attributes.key?(:'fetchStart') && attributes.key?(:'fetch_start')
357
+
358
+ self.fetch_start = attributes[:'fetch_start'] if attributes[:'fetch_start']
359
+
360
+ self.request_start = attributes[:'requestStart'] if attributes[:'requestStart']
361
+
362
+ raise 'You cannot provide both :requestStart and :request_start' if attributes.key?(:'requestStart') && attributes.key?(:'request_start')
363
+
364
+ self.request_start = attributes[:'request_start'] if attributes[:'request_start']
365
+
366
+ self.response_start = attributes[:'responseStart'] if attributes[:'responseStart']
367
+
368
+ raise 'You cannot provide both :responseStart and :response_start' if attributes.key?(:'responseStart') && attributes.key?(:'response_start')
369
+
370
+ self.response_start = attributes[:'response_start'] if attributes[:'response_start']
371
+
372
+ self.response_end = attributes[:'responseEnd'] if attributes[:'responseEnd']
373
+
374
+ raise 'You cannot provide both :responseEnd and :response_end' if attributes.key?(:'responseEnd') && attributes.key?(:'response_end')
375
+
376
+ self.response_end = attributes[:'response_end'] if attributes[:'response_end']
377
+
378
+ self.duration = attributes[:'duration'] if attributes[:'duration']
379
+
380
+ self.encoded_body_size = attributes[:'encodedBodySize'] if attributes[:'encodedBodySize']
381
+
382
+ raise 'You cannot provide both :encodedBodySize and :encoded_body_size' if attributes.key?(:'encodedBodySize') && attributes.key?(:'encoded_body_size')
383
+
384
+ self.encoded_body_size = attributes[:'encoded_body_size'] if attributes[:'encoded_body_size']
385
+ end
386
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
387
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
388
+
389
+ # Custom attribute writer method checking allowed values (enum).
390
+ # @param [Object] error_category Object to be assigned
391
+ def error_category=(error_category)
392
+ # rubocop:disable Style/ConditionalAssignment
393
+ if error_category && !ERROR_CATEGORY_ENUM.include?(error_category)
394
+ # rubocop: disable Metrics/LineLength
395
+ OCI.logger.debug("Unknown value for 'error_category' [" + error_category + "]. Mapping to 'ERROR_CATEGORY_UNKNOWN_ENUM_VALUE'") if OCI.logger
396
+ # rubocop: enable Metrics/LineLength
397
+ @error_category = ERROR_CATEGORY_UNKNOWN_ENUM_VALUE
398
+ else
399
+ @error_category = error_category
400
+ end
401
+ # rubocop:enable Style/ConditionalAssignment
402
+ end
403
+
404
+ # Custom attribute writer method checking allowed values (enum).
405
+ # @param [Object] protocol Object to be assigned
406
+ def protocol=(protocol)
407
+ # rubocop:disable Style/ConditionalAssignment
408
+ if protocol && !PROTOCOL_ENUM.include?(protocol)
409
+ # rubocop: disable Metrics/LineLength
410
+ OCI.logger.debug("Unknown value for 'protocol' [" + protocol + "]. Mapping to 'PROTOCOL_UNKNOWN_ENUM_VALUE'") if OCI.logger
411
+ # rubocop: enable Metrics/LineLength
412
+ @protocol = PROTOCOL_UNKNOWN_ENUM_VALUE
413
+ else
414
+ @protocol = protocol
415
+ end
416
+ # rubocop:enable Style/ConditionalAssignment
417
+ end
418
+
419
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
420
+
421
+
422
+ # Checks equality by comparing each attribute.
423
+ # @param [Object] other the other object to be compared
424
+ def ==(other)
425
+ return true if equal?(other)
426
+
427
+ self.class == other.class &&
428
+ key == other.key &&
429
+ probe_configuration_id == other.probe_configuration_id &&
430
+ start_time == other.start_time &&
431
+ target == other.target &&
432
+ vantage_point_name == other.vantage_point_name &&
433
+ is_timed_out == other.is_timed_out &&
434
+ is_healthy == other.is_healthy &&
435
+ error_category == other.error_category &&
436
+ error_message == other.error_message &&
437
+ protocol == other.protocol &&
438
+ connection == other.connection &&
439
+ dns == other.dns &&
440
+ status_code == other.status_code &&
441
+ domain_lookup_start == other.domain_lookup_start &&
442
+ domain_lookup_end == other.domain_lookup_end &&
443
+ connect_start == other.connect_start &&
444
+ secure_connection_start == other.secure_connection_start &&
445
+ connect_end == other.connect_end &&
446
+ fetch_start == other.fetch_start &&
447
+ request_start == other.request_start &&
448
+ response_start == other.response_start &&
449
+ response_end == other.response_end &&
450
+ duration == other.duration &&
451
+ encoded_body_size == other.encoded_body_size
452
+ end
453
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
454
+
455
+ # @see the `==` method
456
+ # @param [Object] other the other object to be compared
457
+ def eql?(other)
458
+ self == other
459
+ end
460
+
461
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
462
+
463
+
464
+ # Calculates hash code according to all attributes.
465
+ # @return [Fixnum] Hash code
466
+ def hash
467
+ [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
468
+ end
469
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
470
+
471
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
472
+
473
+
474
+ # Builds the object from hash
475
+ # @param [Hash] attributes Model attributes in the form of hash
476
+ # @return [Object] Returns the model itself
477
+ def build_from_hash(attributes)
478
+ return nil unless attributes.is_a?(Hash)
479
+
480
+ self.class.swagger_types.each_pair do |key, type|
481
+ if type =~ /^Array<(.*)>/i
482
+ # check to ensure the input is an array given that the the attribute
483
+ # is documented as an array but the input is not
484
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
485
+ public_method("#{key}=").call(
486
+ attributes[self.class.attribute_map[key]]
487
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
488
+ )
489
+ end
490
+ elsif !attributes[self.class.attribute_map[key]].nil?
491
+ public_method("#{key}=").call(
492
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
493
+ )
494
+ end
495
+ # or else data not found in attributes(hash), not an issue as the data can be optional
496
+ end
497
+
498
+ self
499
+ end
500
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
501
+
502
+ # Returns the string representation of the object
503
+ # @return [String] String presentation of the object
504
+ def to_s
505
+ to_hash.to_s
506
+ end
507
+
508
+ # Returns the object in the form of hash
509
+ # @return [Hash] Returns the object in the form of hash
510
+ def to_hash
511
+ hash = {}
512
+ self.class.attribute_map.each_pair do |attr, param|
513
+ value = public_method(attr).call
514
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
515
+
516
+ hash[param] = _to_hash(value)
517
+ end
518
+ hash
519
+ end
520
+
521
+ private
522
+
523
+ # Outputs non-array value in the form of hash
524
+ # For object, use to_hash. Otherwise, just return the value
525
+ # @param [Object] value Any valid value
526
+ # @return [Hash] Returns the value in the form of hash
527
+ def _to_hash(value)
528
+ if value.is_a?(Array)
529
+ value.compact.map { |v| _to_hash(v) }
530
+ elsif value.is_a?(Hash)
531
+ {}.tap do |hash|
532
+ value.each { |k, v| hash[k] = _to_hash(v) }
533
+ end
534
+ elsif value.respond_to? :to_hash
535
+ value.to_hash
536
+ else
537
+ value
538
+ end
539
+ end
540
+ end
541
+ end
542
+ # rubocop:enable Lint/UnneededCopDisableDirective