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.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/oci.rb +2 -0
- data/lib/oci/database/database.rb +1 -0
- data/lib/oci/database/models/database.rb +18 -4
- data/lib/oci/database/models/database_connection_strings.rb +182 -0
- data/lib/oci/database/models/database_summary.rb +18 -4
- data/lib/oci/dns/dns.rb +23 -0
- data/lib/oci/dns/dns_client.rb +802 -75
- data/lib/oci/dns/dns_client_composite_operations.rb +238 -0
- data/lib/oci/dns/models/create_steering_policy_attachment_details.rb +205 -0
- data/lib/oci/dns/models/create_steering_policy_details.rb +333 -0
- data/lib/oci/dns/models/steering_policy.rb +418 -0
- data/lib/oci/dns/models/steering_policy_answer.rb +205 -0
- data/lib/oci/dns/models/steering_policy_attachment.rb +308 -0
- data/lib/oci/dns/models/steering_policy_attachment_summary.rb +304 -0
- data/lib/oci/dns/models/steering_policy_filter_answer_data.rb +168 -0
- data/lib/oci/dns/models/steering_policy_filter_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_filter_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_health_rule.rb +160 -0
- data/lib/oci/dns/models/steering_policy_health_rule_case.rb +152 -0
- data/lib/oci/dns/models/steering_policy_limit_rule.rb +179 -0
- data/lib/oci/dns/models/steering_policy_limit_rule_case.rb +162 -0
- data/lib/oci/dns/models/steering_policy_priority_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_priority_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_priority_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_rule.rb +237 -0
- data/lib/oci/dns/models/steering_policy_summary.rb +391 -0
- data/lib/oci/dns/models/steering_policy_weighted_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule_case.rb +165 -0
- data/lib/oci/dns/models/update_steering_policy_attachment_details.rb +156 -0
- data/lib/oci/dns/models/update_steering_policy_details.rb +319 -0
- data/lib/oci/email/email.rb +1 -0
- data/lib/oci/email/email_client.rb +87 -16
- data/lib/oci/email/email_client_composite_operations.rb +40 -0
- data/lib/oci/email/models/create_sender_details.rb +40 -6
- data/lib/oci/email/models/create_suppression_details.rb +2 -2
- data/lib/oci/email/models/sender.rb +53 -5
- data/lib/oci/email/models/sender_summary.rb +38 -4
- data/lib/oci/email/models/suppression.rb +20 -3
- data/lib/oci/email/models/update_sender_details.rb +174 -0
- data/lib/oci/healthchecks/health_checks_client.rb +1137 -0
- data/lib/oci/healthchecks/health_checks_client_composite_operations.rb +24 -0
- data/lib/oci/healthchecks/healthchecks.rb +41 -0
- data/lib/oci/healthchecks/models/connection.rb +159 -0
- data/lib/oci/healthchecks/models/create_http_monitor_details.rb +359 -0
- data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +278 -0
- data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +229 -0
- data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +310 -0
- data/lib/oci/healthchecks/models/dns.rb +165 -0
- data/lib/oci/healthchecks/models/geolocation.rb +239 -0
- data/lib/oci/healthchecks/models/health_checks_vantage_point_summary.rb +211 -0
- data/lib/oci/healthchecks/models/http_monitor.rb +395 -0
- data/lib/oci/healthchecks/models/http_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/http_probe.rb +314 -0
- data/lib/oci/healthchecks/models/http_probe_method.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_result_summary.rb +542 -0
- data/lib/oci/healthchecks/models/ping_monitor.rb +340 -0
- data/lib/oci/healthchecks/models/ping_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/ping_probe.rb +259 -0
- data/lib/oci/healthchecks/models/ping_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/ping_probe_result_summary.rb +418 -0
- data/lib/oci/healthchecks/models/routing.rb +192 -0
- data/lib/oci/healthchecks/models/tcp_connection.rb +189 -0
- data/lib/oci/healthchecks/models/update_http_monitor_details.rb +339 -0
- data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +292 -0
- data/lib/oci/healthchecks/util.rb +2 -0
- data/lib/oci/regions.rb +3 -1
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule.rb +283 -0
- data/lib/oci/waas/models/access_rule_criteria.rb +206 -0
- data/lib/oci/waas/models/address_rate_limiting.rb +195 -0
- data/lib/oci/waas/models/block_challenge_settings.rb +288 -0
- data/lib/oci/waas/models/captcha.rb +231 -0
- data/lib/oci/waas/models/certificate.rb +383 -0
- data/lib/oci/waas/models/certificate_extensions.rb +170 -0
- data/lib/oci/waas/models/certificate_public_key_info.rb +170 -0
- data/lib/oci/waas/models/certificate_subject_name.rb +218 -0
- data/lib/oci/waas/models/certificate_summary.rb +274 -0
- data/lib/oci/waas/models/create_certificate_details.rb +241 -0
- data/lib/oci/waas/models/create_waas_policy_details.rb +257 -0
- data/lib/oci/waas/models/device_fingerprint_challenge.rb +268 -0
- data/lib/oci/waas/models/edge_subnet.rb +173 -0
- data/lib/oci/waas/models/good_bot.rb +183 -0
- data/lib/oci/waas/models/header.rb +159 -0
- data/lib/oci/waas/models/human_interaction_challenge.rb +282 -0
- data/lib/oci/waas/models/js_challenge.rb +240 -0
- data/lib/oci/waas/models/lifecycle_states.rb +14 -0
- data/lib/oci/waas/models/origin.rb +191 -0
- data/lib/oci/waas/models/policy_config.rb +181 -0
- data/lib/oci/waas/models/protection_rule.rb +237 -0
- data/lib/oci/waas/models/protection_rule_action.rb +185 -0
- data/lib/oci/waas/models/protection_rule_exclusion.rb +182 -0
- data/lib/oci/waas/models/protection_settings.rb +404 -0
- data/lib/oci/waas/models/recommendation.rb +210 -0
- data/lib/oci/waas/models/threat_feed.rb +202 -0
- data/lib/oci/waas/models/threat_feed_action.rb +175 -0
- data/lib/oci/waas/models/update_certificate_details.rb +183 -0
- data/lib/oci/waas/models/update_waas_policy_details.rb +233 -0
- data/lib/oci/waas/models/waas_policy.rb +331 -0
- data/lib/oci/waas/models/waas_policy_summary.rb +271 -0
- data/lib/oci/waas/models/waf_blocked_request.rb +219 -0
- data/lib/oci/waas/models/waf_config.rb +295 -0
- data/lib/oci/waas/models/waf_config_details.rb +253 -0
- data/lib/oci/waas/models/waf_log.rb +510 -0
- data/lib/oci/waas/models/waf_meter_datum.rb +279 -0
- data/lib/oci/waas/models/waf_request.rb +177 -0
- data/lib/oci/waas/models/waf_traffic_datum.rb +223 -0
- data/lib/oci/waas/models/whitelist.rb +159 -0
- data/lib/oci/waas/models/work_request.rb +322 -0
- data/lib/oci/waas/models/work_request_error.rb +170 -0
- data/lib/oci/waas/models/work_request_log_entry.rb +159 -0
- data/lib/oci/waas/models/work_request_operation_types.rb +12 -0
- data/lib/oci/waas/models/work_request_resource.rb +217 -0
- data/lib/oci/waas/models/work_request_status_values.rb +14 -0
- data/lib/oci/waas/models/work_request_summary.rb +302 -0
- data/lib/oci/waas/util.rb +2 -0
- data/lib/oci/waas/waas.rb +66 -0
- data/lib/oci/waas/waas_client.rb +3044 -0
- data/lib/oci/waas/waas_client_composite_operations.rb +990 -0
- metadata +105 -2
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
6
|
+
module OCI
|
|
7
|
+
# A list of Web Application Firewall log entries. Each entry is a JSON object whose fields vary based on log type. Logs record what rules and countermeasures are triggered by requests and are used as a basis to move request handling into block mode.
|
|
8
|
+
class Waas::Models::WafLog # rubocop:disable Metrics/LineLength
|
|
9
|
+
# The action taken on the request.
|
|
10
|
+
# @return [String]
|
|
11
|
+
attr_accessor :action
|
|
12
|
+
|
|
13
|
+
# The CAPTCHA action taken on the request.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :captcha_action
|
|
16
|
+
|
|
17
|
+
# The CAPTCHA challenge answer that was expected.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :captcha_expected
|
|
20
|
+
|
|
21
|
+
# The CAPTCHA challenge answer that was received.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :captcha_received
|
|
24
|
+
|
|
25
|
+
# The number of times the CAPTCHA challenge was failed.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :captcha_fail_count
|
|
28
|
+
|
|
29
|
+
# The IPv4 address of the requesting client.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :client_address
|
|
32
|
+
|
|
33
|
+
# The name of the country where the request was made.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :country_name
|
|
36
|
+
|
|
37
|
+
# The `User-Agent` header value of the request.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :user_agent
|
|
40
|
+
|
|
41
|
+
# The domain where the request was sent.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :domain
|
|
44
|
+
|
|
45
|
+
# A map of protection rule keys to detection message details.
|
|
46
|
+
# @return [Hash<String, String>]
|
|
47
|
+
attr_accessor :protection_rule_detections
|
|
48
|
+
|
|
49
|
+
# The HTTP method of the request.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :http_method
|
|
52
|
+
|
|
53
|
+
# The path and query string of the request.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :request_url
|
|
56
|
+
|
|
57
|
+
# The map of header names to values of the request sent to the origin.
|
|
58
|
+
# @return [Hash<String, String>]
|
|
59
|
+
attr_accessor :http_headers
|
|
60
|
+
|
|
61
|
+
# The `Referrer` header value of the request.
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :referrer
|
|
64
|
+
|
|
65
|
+
# The status code of the response.
|
|
66
|
+
# @return [Integer]
|
|
67
|
+
attr_accessor :response_code
|
|
68
|
+
|
|
69
|
+
# The size in bytes of the response.
|
|
70
|
+
# @return [Integer]
|
|
71
|
+
attr_accessor :response_size
|
|
72
|
+
|
|
73
|
+
# The incident key that matched the request.
|
|
74
|
+
# @return [String]
|
|
75
|
+
attr_accessor :incident_key
|
|
76
|
+
|
|
77
|
+
# TODO: what is this? MD5 hash of the request? SHA1?
|
|
78
|
+
#
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :fingerprint
|
|
81
|
+
|
|
82
|
+
# The type of device that the request was made from.
|
|
83
|
+
# @return [String]
|
|
84
|
+
attr_accessor :device
|
|
85
|
+
|
|
86
|
+
# The ISO 3166-1 country code of the request.
|
|
87
|
+
# @return [String]
|
|
88
|
+
attr_accessor :country_code
|
|
89
|
+
|
|
90
|
+
# A map of header names to values of the original request.
|
|
91
|
+
# @return [Hash<String, String>]
|
|
92
|
+
attr_accessor :request_headers
|
|
93
|
+
|
|
94
|
+
# The `ThreatFeed` key that matched the request.
|
|
95
|
+
# @return [String]
|
|
96
|
+
attr_accessor :threat_feed_key
|
|
97
|
+
|
|
98
|
+
# The `AccessRule` key that matched the request.
|
|
99
|
+
# @return [String]
|
|
100
|
+
attr_accessor :access_rule_key
|
|
101
|
+
|
|
102
|
+
# The `AddressRateLimiting` key that matched the request.
|
|
103
|
+
# @return [String]
|
|
104
|
+
attr_accessor :address_rate_limiting_key
|
|
105
|
+
|
|
106
|
+
# The `Date` header value of the request.
|
|
107
|
+
# @return [String]
|
|
108
|
+
attr_accessor :timestamp
|
|
109
|
+
|
|
110
|
+
# The type of log of the request.
|
|
111
|
+
# @return [String]
|
|
112
|
+
attr_accessor :log_type
|
|
113
|
+
|
|
114
|
+
# The address of the origin server where the request was sent.
|
|
115
|
+
# @return [String]
|
|
116
|
+
attr_accessor :origin_address
|
|
117
|
+
|
|
118
|
+
# The amount of time it took the origin server to respond to the request.
|
|
119
|
+
# TODO: determine unit of time and example
|
|
120
|
+
#
|
|
121
|
+
# @return [String]
|
|
122
|
+
attr_accessor :origin_response_time
|
|
123
|
+
|
|
124
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
125
|
+
def self.attribute_map
|
|
126
|
+
{
|
|
127
|
+
# rubocop:disable Style/SymbolLiteral
|
|
128
|
+
'action': :'action',
|
|
129
|
+
'captcha_action': :'captchaAction',
|
|
130
|
+
'captcha_expected': :'captchaExpected',
|
|
131
|
+
'captcha_received': :'captchaReceived',
|
|
132
|
+
'captcha_fail_count': :'captchaFailCount',
|
|
133
|
+
'client_address': :'clientAddress',
|
|
134
|
+
'country_name': :'countryName',
|
|
135
|
+
'user_agent': :'userAgent',
|
|
136
|
+
'domain': :'domain',
|
|
137
|
+
'protection_rule_detections': :'protectionRuleDetections',
|
|
138
|
+
'http_method': :'httpMethod',
|
|
139
|
+
'request_url': :'requestUrl',
|
|
140
|
+
'http_headers': :'httpHeaders',
|
|
141
|
+
'referrer': :'referrer',
|
|
142
|
+
'response_code': :'responseCode',
|
|
143
|
+
'response_size': :'responseSize',
|
|
144
|
+
'incident_key': :'incidentKey',
|
|
145
|
+
'fingerprint': :'fingerprint',
|
|
146
|
+
'device': :'device',
|
|
147
|
+
'country_code': :'countryCode',
|
|
148
|
+
'request_headers': :'requestHeaders',
|
|
149
|
+
'threat_feed_key': :'threatFeedKey',
|
|
150
|
+
'access_rule_key': :'accessRuleKey',
|
|
151
|
+
'address_rate_limiting_key': :'addressRateLimitingKey',
|
|
152
|
+
'timestamp': :'timestamp',
|
|
153
|
+
'log_type': :'logType',
|
|
154
|
+
'origin_address': :'originAddress',
|
|
155
|
+
'origin_response_time': :'originResponseTime'
|
|
156
|
+
# rubocop:enable Style/SymbolLiteral
|
|
157
|
+
}
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Attribute type mapping.
|
|
161
|
+
def self.swagger_types
|
|
162
|
+
{
|
|
163
|
+
# rubocop:disable Style/SymbolLiteral
|
|
164
|
+
'action': :'String',
|
|
165
|
+
'captcha_action': :'String',
|
|
166
|
+
'captcha_expected': :'String',
|
|
167
|
+
'captcha_received': :'String',
|
|
168
|
+
'captcha_fail_count': :'String',
|
|
169
|
+
'client_address': :'String',
|
|
170
|
+
'country_name': :'String',
|
|
171
|
+
'user_agent': :'String',
|
|
172
|
+
'domain': :'String',
|
|
173
|
+
'protection_rule_detections': :'Hash<String, String>',
|
|
174
|
+
'http_method': :'String',
|
|
175
|
+
'request_url': :'String',
|
|
176
|
+
'http_headers': :'Hash<String, String>',
|
|
177
|
+
'referrer': :'String',
|
|
178
|
+
'response_code': :'Integer',
|
|
179
|
+
'response_size': :'Integer',
|
|
180
|
+
'incident_key': :'String',
|
|
181
|
+
'fingerprint': :'String',
|
|
182
|
+
'device': :'String',
|
|
183
|
+
'country_code': :'String',
|
|
184
|
+
'request_headers': :'Hash<String, String>',
|
|
185
|
+
'threat_feed_key': :'String',
|
|
186
|
+
'access_rule_key': :'String',
|
|
187
|
+
'address_rate_limiting_key': :'String',
|
|
188
|
+
'timestamp': :'String',
|
|
189
|
+
'log_type': :'String',
|
|
190
|
+
'origin_address': :'String',
|
|
191
|
+
'origin_response_time': :'String'
|
|
192
|
+
# rubocop:enable Style/SymbolLiteral
|
|
193
|
+
}
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
197
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
# Initializes the object
|
|
201
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
202
|
+
# @option attributes [String] :action The value to assign to the {#action} property
|
|
203
|
+
# @option attributes [String] :captcha_action The value to assign to the {#captcha_action} property
|
|
204
|
+
# @option attributes [String] :captcha_expected The value to assign to the {#captcha_expected} property
|
|
205
|
+
# @option attributes [String] :captcha_received The value to assign to the {#captcha_received} property
|
|
206
|
+
# @option attributes [String] :captcha_fail_count The value to assign to the {#captcha_fail_count} property
|
|
207
|
+
# @option attributes [String] :client_address The value to assign to the {#client_address} property
|
|
208
|
+
# @option attributes [String] :country_name The value to assign to the {#country_name} property
|
|
209
|
+
# @option attributes [String] :user_agent The value to assign to the {#user_agent} property
|
|
210
|
+
# @option attributes [String] :domain The value to assign to the {#domain} property
|
|
211
|
+
# @option attributes [Hash<String, String>] :protection_rule_detections The value to assign to the {#protection_rule_detections} property
|
|
212
|
+
# @option attributes [String] :http_method The value to assign to the {#http_method} property
|
|
213
|
+
# @option attributes [String] :request_url The value to assign to the {#request_url} property
|
|
214
|
+
# @option attributes [Hash<String, String>] :http_headers The value to assign to the {#http_headers} property
|
|
215
|
+
# @option attributes [String] :referrer The value to assign to the {#referrer} property
|
|
216
|
+
# @option attributes [Integer] :response_code The value to assign to the {#response_code} property
|
|
217
|
+
# @option attributes [Integer] :response_size The value to assign to the {#response_size} property
|
|
218
|
+
# @option attributes [String] :incident_key The value to assign to the {#incident_key} property
|
|
219
|
+
# @option attributes [String] :fingerprint The value to assign to the {#fingerprint} property
|
|
220
|
+
# @option attributes [String] :device The value to assign to the {#device} property
|
|
221
|
+
# @option attributes [String] :country_code The value to assign to the {#country_code} property
|
|
222
|
+
# @option attributes [Hash<String, String>] :request_headers The value to assign to the {#request_headers} property
|
|
223
|
+
# @option attributes [String] :threat_feed_key The value to assign to the {#threat_feed_key} property
|
|
224
|
+
# @option attributes [String] :access_rule_key The value to assign to the {#access_rule_key} property
|
|
225
|
+
# @option attributes [String] :address_rate_limiting_key The value to assign to the {#address_rate_limiting_key} property
|
|
226
|
+
# @option attributes [String] :timestamp The value to assign to the {#timestamp} property
|
|
227
|
+
# @option attributes [String] :log_type The value to assign to the {#log_type} property
|
|
228
|
+
# @option attributes [String] :origin_address The value to assign to the {#origin_address} property
|
|
229
|
+
# @option attributes [String] :origin_response_time The value to assign to the {#origin_response_time} property
|
|
230
|
+
def initialize(attributes = {})
|
|
231
|
+
return unless attributes.is_a?(Hash)
|
|
232
|
+
|
|
233
|
+
# convert string to symbol for hash key
|
|
234
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
235
|
+
|
|
236
|
+
self.action = attributes[:'action'] if attributes[:'action']
|
|
237
|
+
|
|
238
|
+
self.captcha_action = attributes[:'captchaAction'] if attributes[:'captchaAction']
|
|
239
|
+
|
|
240
|
+
raise 'You cannot provide both :captchaAction and :captcha_action' if attributes.key?(:'captchaAction') && attributes.key?(:'captcha_action')
|
|
241
|
+
|
|
242
|
+
self.captcha_action = attributes[:'captcha_action'] if attributes[:'captcha_action']
|
|
243
|
+
|
|
244
|
+
self.captcha_expected = attributes[:'captchaExpected'] if attributes[:'captchaExpected']
|
|
245
|
+
|
|
246
|
+
raise 'You cannot provide both :captchaExpected and :captcha_expected' if attributes.key?(:'captchaExpected') && attributes.key?(:'captcha_expected')
|
|
247
|
+
|
|
248
|
+
self.captcha_expected = attributes[:'captcha_expected'] if attributes[:'captcha_expected']
|
|
249
|
+
|
|
250
|
+
self.captcha_received = attributes[:'captchaReceived'] if attributes[:'captchaReceived']
|
|
251
|
+
|
|
252
|
+
raise 'You cannot provide both :captchaReceived and :captcha_received' if attributes.key?(:'captchaReceived') && attributes.key?(:'captcha_received')
|
|
253
|
+
|
|
254
|
+
self.captcha_received = attributes[:'captcha_received'] if attributes[:'captcha_received']
|
|
255
|
+
|
|
256
|
+
self.captcha_fail_count = attributes[:'captchaFailCount'] if attributes[:'captchaFailCount']
|
|
257
|
+
|
|
258
|
+
raise 'You cannot provide both :captchaFailCount and :captcha_fail_count' if attributes.key?(:'captchaFailCount') && attributes.key?(:'captcha_fail_count')
|
|
259
|
+
|
|
260
|
+
self.captcha_fail_count = attributes[:'captcha_fail_count'] if attributes[:'captcha_fail_count']
|
|
261
|
+
|
|
262
|
+
self.client_address = attributes[:'clientAddress'] if attributes[:'clientAddress']
|
|
263
|
+
|
|
264
|
+
raise 'You cannot provide both :clientAddress and :client_address' if attributes.key?(:'clientAddress') && attributes.key?(:'client_address')
|
|
265
|
+
|
|
266
|
+
self.client_address = attributes[:'client_address'] if attributes[:'client_address']
|
|
267
|
+
|
|
268
|
+
self.country_name = attributes[:'countryName'] if attributes[:'countryName']
|
|
269
|
+
|
|
270
|
+
raise 'You cannot provide both :countryName and :country_name' if attributes.key?(:'countryName') && attributes.key?(:'country_name')
|
|
271
|
+
|
|
272
|
+
self.country_name = attributes[:'country_name'] if attributes[:'country_name']
|
|
273
|
+
|
|
274
|
+
self.user_agent = attributes[:'userAgent'] if attributes[:'userAgent']
|
|
275
|
+
|
|
276
|
+
raise 'You cannot provide both :userAgent and :user_agent' if attributes.key?(:'userAgent') && attributes.key?(:'user_agent')
|
|
277
|
+
|
|
278
|
+
self.user_agent = attributes[:'user_agent'] if attributes[:'user_agent']
|
|
279
|
+
|
|
280
|
+
self.domain = attributes[:'domain'] if attributes[:'domain']
|
|
281
|
+
|
|
282
|
+
self.protection_rule_detections = attributes[:'protectionRuleDetections'] if attributes[:'protectionRuleDetections']
|
|
283
|
+
|
|
284
|
+
raise 'You cannot provide both :protectionRuleDetections and :protection_rule_detections' if attributes.key?(:'protectionRuleDetections') && attributes.key?(:'protection_rule_detections')
|
|
285
|
+
|
|
286
|
+
self.protection_rule_detections = attributes[:'protection_rule_detections'] if attributes[:'protection_rule_detections']
|
|
287
|
+
|
|
288
|
+
self.http_method = attributes[:'httpMethod'] if attributes[:'httpMethod']
|
|
289
|
+
|
|
290
|
+
raise 'You cannot provide both :httpMethod and :http_method' if attributes.key?(:'httpMethod') && attributes.key?(:'http_method')
|
|
291
|
+
|
|
292
|
+
self.http_method = attributes[:'http_method'] if attributes[:'http_method']
|
|
293
|
+
|
|
294
|
+
self.request_url = attributes[:'requestUrl'] if attributes[:'requestUrl']
|
|
295
|
+
|
|
296
|
+
raise 'You cannot provide both :requestUrl and :request_url' if attributes.key?(:'requestUrl') && attributes.key?(:'request_url')
|
|
297
|
+
|
|
298
|
+
self.request_url = attributes[:'request_url'] if attributes[:'request_url']
|
|
299
|
+
|
|
300
|
+
self.http_headers = attributes[:'httpHeaders'] if attributes[:'httpHeaders']
|
|
301
|
+
|
|
302
|
+
raise 'You cannot provide both :httpHeaders and :http_headers' if attributes.key?(:'httpHeaders') && attributes.key?(:'http_headers')
|
|
303
|
+
|
|
304
|
+
self.http_headers = attributes[:'http_headers'] if attributes[:'http_headers']
|
|
305
|
+
|
|
306
|
+
self.referrer = attributes[:'referrer'] if attributes[:'referrer']
|
|
307
|
+
|
|
308
|
+
self.response_code = attributes[:'responseCode'] if attributes[:'responseCode']
|
|
309
|
+
|
|
310
|
+
raise 'You cannot provide both :responseCode and :response_code' if attributes.key?(:'responseCode') && attributes.key?(:'response_code')
|
|
311
|
+
|
|
312
|
+
self.response_code = attributes[:'response_code'] if attributes[:'response_code']
|
|
313
|
+
|
|
314
|
+
self.response_size = attributes[:'responseSize'] if attributes[:'responseSize']
|
|
315
|
+
|
|
316
|
+
raise 'You cannot provide both :responseSize and :response_size' if attributes.key?(:'responseSize') && attributes.key?(:'response_size')
|
|
317
|
+
|
|
318
|
+
self.response_size = attributes[:'response_size'] if attributes[:'response_size']
|
|
319
|
+
|
|
320
|
+
self.incident_key = attributes[:'incidentKey'] if attributes[:'incidentKey']
|
|
321
|
+
|
|
322
|
+
raise 'You cannot provide both :incidentKey and :incident_key' if attributes.key?(:'incidentKey') && attributes.key?(:'incident_key')
|
|
323
|
+
|
|
324
|
+
self.incident_key = attributes[:'incident_key'] if attributes[:'incident_key']
|
|
325
|
+
|
|
326
|
+
self.fingerprint = attributes[:'fingerprint'] if attributes[:'fingerprint']
|
|
327
|
+
|
|
328
|
+
self.device = attributes[:'device'] if attributes[:'device']
|
|
329
|
+
|
|
330
|
+
self.country_code = attributes[:'countryCode'] if attributes[:'countryCode']
|
|
331
|
+
|
|
332
|
+
raise 'You cannot provide both :countryCode and :country_code' if attributes.key?(:'countryCode') && attributes.key?(:'country_code')
|
|
333
|
+
|
|
334
|
+
self.country_code = attributes[:'country_code'] if attributes[:'country_code']
|
|
335
|
+
|
|
336
|
+
self.request_headers = attributes[:'requestHeaders'] if attributes[:'requestHeaders']
|
|
337
|
+
|
|
338
|
+
raise 'You cannot provide both :requestHeaders and :request_headers' if attributes.key?(:'requestHeaders') && attributes.key?(:'request_headers')
|
|
339
|
+
|
|
340
|
+
self.request_headers = attributes[:'request_headers'] if attributes[:'request_headers']
|
|
341
|
+
|
|
342
|
+
self.threat_feed_key = attributes[:'threatFeedKey'] if attributes[:'threatFeedKey']
|
|
343
|
+
|
|
344
|
+
raise 'You cannot provide both :threatFeedKey and :threat_feed_key' if attributes.key?(:'threatFeedKey') && attributes.key?(:'threat_feed_key')
|
|
345
|
+
|
|
346
|
+
self.threat_feed_key = attributes[:'threat_feed_key'] if attributes[:'threat_feed_key']
|
|
347
|
+
|
|
348
|
+
self.access_rule_key = attributes[:'accessRuleKey'] if attributes[:'accessRuleKey']
|
|
349
|
+
|
|
350
|
+
raise 'You cannot provide both :accessRuleKey and :access_rule_key' if attributes.key?(:'accessRuleKey') && attributes.key?(:'access_rule_key')
|
|
351
|
+
|
|
352
|
+
self.access_rule_key = attributes[:'access_rule_key'] if attributes[:'access_rule_key']
|
|
353
|
+
|
|
354
|
+
self.address_rate_limiting_key = attributes[:'addressRateLimitingKey'] if attributes[:'addressRateLimitingKey']
|
|
355
|
+
|
|
356
|
+
raise 'You cannot provide both :addressRateLimitingKey and :address_rate_limiting_key' if attributes.key?(:'addressRateLimitingKey') && attributes.key?(:'address_rate_limiting_key')
|
|
357
|
+
|
|
358
|
+
self.address_rate_limiting_key = attributes[:'address_rate_limiting_key'] if attributes[:'address_rate_limiting_key']
|
|
359
|
+
|
|
360
|
+
self.timestamp = attributes[:'timestamp'] if attributes[:'timestamp']
|
|
361
|
+
|
|
362
|
+
self.log_type = attributes[:'logType'] if attributes[:'logType']
|
|
363
|
+
|
|
364
|
+
raise 'You cannot provide both :logType and :log_type' if attributes.key?(:'logType') && attributes.key?(:'log_type')
|
|
365
|
+
|
|
366
|
+
self.log_type = attributes[:'log_type'] if attributes[:'log_type']
|
|
367
|
+
|
|
368
|
+
self.origin_address = attributes[:'originAddress'] if attributes[:'originAddress']
|
|
369
|
+
|
|
370
|
+
raise 'You cannot provide both :originAddress and :origin_address' if attributes.key?(:'originAddress') && attributes.key?(:'origin_address')
|
|
371
|
+
|
|
372
|
+
self.origin_address = attributes[:'origin_address'] if attributes[:'origin_address']
|
|
373
|
+
|
|
374
|
+
self.origin_response_time = attributes[:'originResponseTime'] if attributes[:'originResponseTime']
|
|
375
|
+
|
|
376
|
+
raise 'You cannot provide both :originResponseTime and :origin_response_time' if attributes.key?(:'originResponseTime') && attributes.key?(:'origin_response_time')
|
|
377
|
+
|
|
378
|
+
self.origin_response_time = attributes[:'origin_response_time'] if attributes[:'origin_response_time']
|
|
379
|
+
end
|
|
380
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
381
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
382
|
+
|
|
383
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
# Checks equality by comparing each attribute.
|
|
387
|
+
# @param [Object] other the other object to be compared
|
|
388
|
+
def ==(other)
|
|
389
|
+
return true if equal?(other)
|
|
390
|
+
|
|
391
|
+
self.class == other.class &&
|
|
392
|
+
action == other.action &&
|
|
393
|
+
captcha_action == other.captcha_action &&
|
|
394
|
+
captcha_expected == other.captcha_expected &&
|
|
395
|
+
captcha_received == other.captcha_received &&
|
|
396
|
+
captcha_fail_count == other.captcha_fail_count &&
|
|
397
|
+
client_address == other.client_address &&
|
|
398
|
+
country_name == other.country_name &&
|
|
399
|
+
user_agent == other.user_agent &&
|
|
400
|
+
domain == other.domain &&
|
|
401
|
+
protection_rule_detections == other.protection_rule_detections &&
|
|
402
|
+
http_method == other.http_method &&
|
|
403
|
+
request_url == other.request_url &&
|
|
404
|
+
http_headers == other.http_headers &&
|
|
405
|
+
referrer == other.referrer &&
|
|
406
|
+
response_code == other.response_code &&
|
|
407
|
+
response_size == other.response_size &&
|
|
408
|
+
incident_key == other.incident_key &&
|
|
409
|
+
fingerprint == other.fingerprint &&
|
|
410
|
+
device == other.device &&
|
|
411
|
+
country_code == other.country_code &&
|
|
412
|
+
request_headers == other.request_headers &&
|
|
413
|
+
threat_feed_key == other.threat_feed_key &&
|
|
414
|
+
access_rule_key == other.access_rule_key &&
|
|
415
|
+
address_rate_limiting_key == other.address_rate_limiting_key &&
|
|
416
|
+
timestamp == other.timestamp &&
|
|
417
|
+
log_type == other.log_type &&
|
|
418
|
+
origin_address == other.origin_address &&
|
|
419
|
+
origin_response_time == other.origin_response_time
|
|
420
|
+
end
|
|
421
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
422
|
+
|
|
423
|
+
# @see the `==` method
|
|
424
|
+
# @param [Object] other the other object to be compared
|
|
425
|
+
def eql?(other)
|
|
426
|
+
self == other
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
# Calculates hash code according to all attributes.
|
|
433
|
+
# @return [Fixnum] Hash code
|
|
434
|
+
def hash
|
|
435
|
+
[action, captcha_action, captcha_expected, captcha_received, captcha_fail_count, client_address, country_name, user_agent, domain, protection_rule_detections, http_method, request_url, http_headers, referrer, response_code, response_size, incident_key, fingerprint, device, country_code, request_headers, threat_feed_key, access_rule_key, address_rate_limiting_key, timestamp, log_type, origin_address, origin_response_time].hash
|
|
436
|
+
end
|
|
437
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
438
|
+
|
|
439
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
# Builds the object from hash
|
|
443
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
444
|
+
# @return [Object] Returns the model itself
|
|
445
|
+
def build_from_hash(attributes)
|
|
446
|
+
return nil unless attributes.is_a?(Hash)
|
|
447
|
+
|
|
448
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
449
|
+
if type =~ /^Array<(.*)>/i
|
|
450
|
+
# check to ensure the input is an array given that the the attribute
|
|
451
|
+
# is documented as an array but the input is not
|
|
452
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
453
|
+
public_method("#{key}=").call(
|
|
454
|
+
attributes[self.class.attribute_map[key]]
|
|
455
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
456
|
+
)
|
|
457
|
+
end
|
|
458
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
459
|
+
public_method("#{key}=").call(
|
|
460
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
461
|
+
)
|
|
462
|
+
end
|
|
463
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
self
|
|
467
|
+
end
|
|
468
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
469
|
+
|
|
470
|
+
# Returns the string representation of the object
|
|
471
|
+
# @return [String] String presentation of the object
|
|
472
|
+
def to_s
|
|
473
|
+
to_hash.to_s
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
# Returns the object in the form of hash
|
|
477
|
+
# @return [Hash] Returns the object in the form of hash
|
|
478
|
+
def to_hash
|
|
479
|
+
hash = {}
|
|
480
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
481
|
+
value = public_method(attr).call
|
|
482
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
483
|
+
|
|
484
|
+
hash[param] = _to_hash(value)
|
|
485
|
+
end
|
|
486
|
+
hash
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
private
|
|
490
|
+
|
|
491
|
+
# Outputs non-array value in the form of hash
|
|
492
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
493
|
+
# @param [Object] value Any valid value
|
|
494
|
+
# @return [Hash] Returns the value in the form of hash
|
|
495
|
+
def _to_hash(value)
|
|
496
|
+
if value.is_a?(Array)
|
|
497
|
+
value.compact.map { |v| _to_hash(v) }
|
|
498
|
+
elsif value.is_a?(Hash)
|
|
499
|
+
{}.tap do |hash|
|
|
500
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
501
|
+
end
|
|
502
|
+
elsif value.respond_to? :to_hash
|
|
503
|
+
value.to_hash
|
|
504
|
+
else
|
|
505
|
+
value
|
|
506
|
+
end
|
|
507
|
+
end
|
|
508
|
+
end
|
|
509
|
+
end
|
|
510
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|