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,304 @@
|
|
|
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
|
+
# An attachment between a steering policy and a domain.
|
|
9
|
+
class Dns::Models::SteeringPolicyAttachmentSummary # rubocop:disable Metrics/LineLength
|
|
10
|
+
LIFECYCLE_STATE_ENUM = [
|
|
11
|
+
LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
|
|
12
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
|
|
13
|
+
LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
|
|
14
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
# The OCID of the attached steering policy.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :steering_policy_id
|
|
20
|
+
|
|
21
|
+
# The OCID of the attached zone.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :zone_id
|
|
24
|
+
|
|
25
|
+
# The attached domain within the attached zone.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :domain_name
|
|
28
|
+
|
|
29
|
+
# A user-friendly name for the steering policy attachment.
|
|
30
|
+
# Does not have to be unique, and it's changeable.
|
|
31
|
+
# Avoid entering confidential information.
|
|
32
|
+
#
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :display_name
|
|
35
|
+
|
|
36
|
+
# The record types covered by the attachment at the domain. The set of record types is
|
|
37
|
+
# determined by aggregating the record types from the answers defined in the steering
|
|
38
|
+
# policy.
|
|
39
|
+
#
|
|
40
|
+
# @return [Array<String>]
|
|
41
|
+
attr_accessor :rtypes
|
|
42
|
+
|
|
43
|
+
# The OCID of the compartment containing the steering policy attachment.
|
|
44
|
+
# @return [String]
|
|
45
|
+
attr_accessor :compartment_id
|
|
46
|
+
|
|
47
|
+
# The canonical absolute URL of the resource.
|
|
48
|
+
# @return [String]
|
|
49
|
+
attr_accessor :_self
|
|
50
|
+
|
|
51
|
+
# The OCID of the resource.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :id
|
|
54
|
+
|
|
55
|
+
# The date and time the resource was created in \"YYYY-MM-ddThh:mmZ\" format
|
|
56
|
+
# with a Z offset, as defined by RFC 3339.
|
|
57
|
+
#
|
|
58
|
+
# **Example:** `2016-07-22T17:23:59:60Z`
|
|
59
|
+
#
|
|
60
|
+
# @return [DateTime]
|
|
61
|
+
attr_accessor :time_created
|
|
62
|
+
|
|
63
|
+
# The current state of the resource.
|
|
64
|
+
# @return [String]
|
|
65
|
+
attr_reader :lifecycle_state
|
|
66
|
+
|
|
67
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
68
|
+
def self.attribute_map
|
|
69
|
+
{
|
|
70
|
+
# rubocop:disable Style/SymbolLiteral
|
|
71
|
+
'steering_policy_id': :'steeringPolicyId',
|
|
72
|
+
'zone_id': :'zoneId',
|
|
73
|
+
'domain_name': :'domainName',
|
|
74
|
+
'display_name': :'displayName',
|
|
75
|
+
'rtypes': :'rtypes',
|
|
76
|
+
'compartment_id': :'compartmentId',
|
|
77
|
+
'_self': :'self',
|
|
78
|
+
'id': :'id',
|
|
79
|
+
'time_created': :'timeCreated',
|
|
80
|
+
'lifecycle_state': :'lifecycleState'
|
|
81
|
+
# rubocop:enable Style/SymbolLiteral
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Attribute type mapping.
|
|
86
|
+
def self.swagger_types
|
|
87
|
+
{
|
|
88
|
+
# rubocop:disable Style/SymbolLiteral
|
|
89
|
+
'steering_policy_id': :'String',
|
|
90
|
+
'zone_id': :'String',
|
|
91
|
+
'domain_name': :'String',
|
|
92
|
+
'display_name': :'String',
|
|
93
|
+
'rtypes': :'Array<String>',
|
|
94
|
+
'compartment_id': :'String',
|
|
95
|
+
'_self': :'String',
|
|
96
|
+
'id': :'String',
|
|
97
|
+
'time_created': :'DateTime',
|
|
98
|
+
'lifecycle_state': :'String'
|
|
99
|
+
# rubocop:enable Style/SymbolLiteral
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
104
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# Initializes the object
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @option attributes [String] :steering_policy_id The value to assign to the {#steering_policy_id} property
|
|
110
|
+
# @option attributes [String] :zone_id The value to assign to the {#zone_id} property
|
|
111
|
+
# @option attributes [String] :domain_name The value to assign to the {#domain_name} property
|
|
112
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
113
|
+
# @option attributes [Array<String>] :rtypes The value to assign to the {#rtypes} property
|
|
114
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
|
115
|
+
# @option attributes [String] :_self The value to assign to the {#_self} property
|
|
116
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
|
117
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
|
118
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
|
119
|
+
def initialize(attributes = {})
|
|
120
|
+
return unless attributes.is_a?(Hash)
|
|
121
|
+
|
|
122
|
+
# convert string to symbol for hash key
|
|
123
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
124
|
+
|
|
125
|
+
self.steering_policy_id = attributes[:'steeringPolicyId'] if attributes[:'steeringPolicyId']
|
|
126
|
+
|
|
127
|
+
raise 'You cannot provide both :steeringPolicyId and :steering_policy_id' if attributes.key?(:'steeringPolicyId') && attributes.key?(:'steering_policy_id')
|
|
128
|
+
|
|
129
|
+
self.steering_policy_id = attributes[:'steering_policy_id'] if attributes[:'steering_policy_id']
|
|
130
|
+
|
|
131
|
+
self.zone_id = attributes[:'zoneId'] if attributes[:'zoneId']
|
|
132
|
+
|
|
133
|
+
raise 'You cannot provide both :zoneId and :zone_id' if attributes.key?(:'zoneId') && attributes.key?(:'zone_id')
|
|
134
|
+
|
|
135
|
+
self.zone_id = attributes[:'zone_id'] if attributes[:'zone_id']
|
|
136
|
+
|
|
137
|
+
self.domain_name = attributes[:'domainName'] if attributes[:'domainName']
|
|
138
|
+
|
|
139
|
+
raise 'You cannot provide both :domainName and :domain_name' if attributes.key?(:'domainName') && attributes.key?(:'domain_name')
|
|
140
|
+
|
|
141
|
+
self.domain_name = attributes[:'domain_name'] if attributes[:'domain_name']
|
|
142
|
+
|
|
143
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
144
|
+
|
|
145
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
146
|
+
|
|
147
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
148
|
+
|
|
149
|
+
self.rtypes = attributes[:'rtypes'] if attributes[:'rtypes']
|
|
150
|
+
|
|
151
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
|
152
|
+
|
|
153
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
|
154
|
+
|
|
155
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
|
156
|
+
|
|
157
|
+
self._self = attributes[:'self'] if attributes[:'self']
|
|
158
|
+
|
|
159
|
+
raise 'You cannot provide both :self and :_self' if attributes.key?(:'self') && attributes.key?(:'_self')
|
|
160
|
+
|
|
161
|
+
self._self = attributes[:'_self'] if attributes[:'_self']
|
|
162
|
+
|
|
163
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
|
164
|
+
|
|
165
|
+
self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
|
|
166
|
+
|
|
167
|
+
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
|
168
|
+
|
|
169
|
+
self.time_created = attributes[:'time_created'] if attributes[:'time_created']
|
|
170
|
+
|
|
171
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
|
172
|
+
|
|
173
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
|
174
|
+
|
|
175
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
|
176
|
+
end
|
|
177
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
178
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
179
|
+
|
|
180
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
181
|
+
# @param [Object] lifecycle_state Object to be assigned
|
|
182
|
+
def lifecycle_state=(lifecycle_state)
|
|
183
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
184
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
|
185
|
+
# rubocop: disable Metrics/LineLength
|
|
186
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
187
|
+
# rubocop: enable Metrics/LineLength
|
|
188
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
|
189
|
+
else
|
|
190
|
+
@lifecycle_state = lifecycle_state
|
|
191
|
+
end
|
|
192
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
# Checks equality by comparing each attribute.
|
|
199
|
+
# @param [Object] other the other object to be compared
|
|
200
|
+
def ==(other)
|
|
201
|
+
return true if equal?(other)
|
|
202
|
+
|
|
203
|
+
self.class == other.class &&
|
|
204
|
+
steering_policy_id == other.steering_policy_id &&
|
|
205
|
+
zone_id == other.zone_id &&
|
|
206
|
+
domain_name == other.domain_name &&
|
|
207
|
+
display_name == other.display_name &&
|
|
208
|
+
rtypes == other.rtypes &&
|
|
209
|
+
compartment_id == other.compartment_id &&
|
|
210
|
+
_self == other._self &&
|
|
211
|
+
id == other.id &&
|
|
212
|
+
time_created == other.time_created &&
|
|
213
|
+
lifecycle_state == other.lifecycle_state
|
|
214
|
+
end
|
|
215
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
216
|
+
|
|
217
|
+
# @see the `==` method
|
|
218
|
+
# @param [Object] other the other object to be compared
|
|
219
|
+
def eql?(other)
|
|
220
|
+
self == other
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
# Calculates hash code according to all attributes.
|
|
227
|
+
# @return [Fixnum] Hash code
|
|
228
|
+
def hash
|
|
229
|
+
[steering_policy_id, zone_id, domain_name, display_name, rtypes, compartment_id, _self, id, time_created, lifecycle_state].hash
|
|
230
|
+
end
|
|
231
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
232
|
+
|
|
233
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
# Builds the object from hash
|
|
237
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
238
|
+
# @return [Object] Returns the model itself
|
|
239
|
+
def build_from_hash(attributes)
|
|
240
|
+
return nil unless attributes.is_a?(Hash)
|
|
241
|
+
|
|
242
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
243
|
+
if type =~ /^Array<(.*)>/i
|
|
244
|
+
# check to ensure the input is an array given that the the attribute
|
|
245
|
+
# is documented as an array but the input is not
|
|
246
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
247
|
+
public_method("#{key}=").call(
|
|
248
|
+
attributes[self.class.attribute_map[key]]
|
|
249
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
250
|
+
)
|
|
251
|
+
end
|
|
252
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
253
|
+
public_method("#{key}=").call(
|
|
254
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
self
|
|
261
|
+
end
|
|
262
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
263
|
+
|
|
264
|
+
# Returns the string representation of the object
|
|
265
|
+
# @return [String] String presentation of the object
|
|
266
|
+
def to_s
|
|
267
|
+
to_hash.to_s
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Returns the object in the form of hash
|
|
271
|
+
# @return [Hash] Returns the object in the form of hash
|
|
272
|
+
def to_hash
|
|
273
|
+
hash = {}
|
|
274
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
275
|
+
value = public_method(attr).call
|
|
276
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
277
|
+
|
|
278
|
+
hash[param] = _to_hash(value)
|
|
279
|
+
end
|
|
280
|
+
hash
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
private
|
|
284
|
+
|
|
285
|
+
# Outputs non-array value in the form of hash
|
|
286
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
287
|
+
# @param [Object] value Any valid value
|
|
288
|
+
# @return [Hash] Returns the value in the form of hash
|
|
289
|
+
def _to_hash(value)
|
|
290
|
+
if value.is_a?(Array)
|
|
291
|
+
value.compact.map { |v| _to_hash(v) }
|
|
292
|
+
elsif value.is_a?(Hash)
|
|
293
|
+
{}.tap do |hash|
|
|
294
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
295
|
+
end
|
|
296
|
+
elsif value.respond_to? :to_hash
|
|
297
|
+
value.to_hash
|
|
298
|
+
else
|
|
299
|
+
value
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
# SteeringPolicyFilterAnswerData model.
|
|
8
|
+
class Dns::Models::SteeringPolicyFilterAnswerData # rubocop:disable Metrics/LineLength
|
|
9
|
+
# @return [String]
|
|
10
|
+
attr_accessor :answer_condition
|
|
11
|
+
|
|
12
|
+
# Keep the answer if the value is `true`.
|
|
13
|
+
# @return [BOOLEAN]
|
|
14
|
+
attr_accessor :should_keep
|
|
15
|
+
|
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
17
|
+
def self.attribute_map
|
|
18
|
+
{
|
|
19
|
+
# rubocop:disable Style/SymbolLiteral
|
|
20
|
+
'answer_condition': :'answerCondition',
|
|
21
|
+
'should_keep': :'shouldKeep'
|
|
22
|
+
# rubocop:enable Style/SymbolLiteral
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Attribute type mapping.
|
|
27
|
+
def self.swagger_types
|
|
28
|
+
{
|
|
29
|
+
# rubocop:disable Style/SymbolLiteral
|
|
30
|
+
'answer_condition': :'String',
|
|
31
|
+
'should_keep': :'BOOLEAN'
|
|
32
|
+
# rubocop:enable Style/SymbolLiteral
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
37
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Initializes the object
|
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
42
|
+
# @option attributes [String] :answer_condition The value to assign to the {#answer_condition} property
|
|
43
|
+
# @option attributes [BOOLEAN] :should_keep The value to assign to the {#should_keep} property
|
|
44
|
+
def initialize(attributes = {})
|
|
45
|
+
return unless attributes.is_a?(Hash)
|
|
46
|
+
|
|
47
|
+
# convert string to symbol for hash key
|
|
48
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
49
|
+
|
|
50
|
+
self.answer_condition = attributes[:'answerCondition'] if attributes[:'answerCondition']
|
|
51
|
+
|
|
52
|
+
raise 'You cannot provide both :answerCondition and :answer_condition' if attributes.key?(:'answerCondition') && attributes.key?(:'answer_condition')
|
|
53
|
+
|
|
54
|
+
self.answer_condition = attributes[:'answer_condition'] if attributes[:'answer_condition']
|
|
55
|
+
|
|
56
|
+
self.should_keep = attributes[:'shouldKeep'] unless attributes[:'shouldKeep'].nil?
|
|
57
|
+
self.should_keep = false if should_keep.nil? && !attributes.key?(:'shouldKeep') # rubocop:disable Style/StringLiterals
|
|
58
|
+
|
|
59
|
+
raise 'You cannot provide both :shouldKeep and :should_keep' if attributes.key?(:'shouldKeep') && attributes.key?(:'should_keep')
|
|
60
|
+
|
|
61
|
+
self.should_keep = attributes[:'should_keep'] unless attributes[:'should_keep'].nil?
|
|
62
|
+
self.should_keep = false if should_keep.nil? && !attributes.key?(:'shouldKeep') && !attributes.key?(:'should_keep') # rubocop:disable Style/StringLiterals
|
|
63
|
+
end
|
|
64
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
65
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
66
|
+
|
|
67
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# Checks equality by comparing each attribute.
|
|
71
|
+
# @param [Object] other the other object to be compared
|
|
72
|
+
def ==(other)
|
|
73
|
+
return true if equal?(other)
|
|
74
|
+
|
|
75
|
+
self.class == other.class &&
|
|
76
|
+
answer_condition == other.answer_condition &&
|
|
77
|
+
should_keep == other.should_keep
|
|
78
|
+
end
|
|
79
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
80
|
+
|
|
81
|
+
# @see the `==` method
|
|
82
|
+
# @param [Object] other the other object to be compared
|
|
83
|
+
def eql?(other)
|
|
84
|
+
self == other
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
# Calculates hash code according to all attributes.
|
|
91
|
+
# @return [Fixnum] Hash code
|
|
92
|
+
def hash
|
|
93
|
+
[answer_condition, should_keep].hash
|
|
94
|
+
end
|
|
95
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
96
|
+
|
|
97
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# Builds the object from hash
|
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
|
+
# @return [Object] Returns the model itself
|
|
103
|
+
def build_from_hash(attributes)
|
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
|
105
|
+
|
|
106
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
107
|
+
if type =~ /^Array<(.*)>/i
|
|
108
|
+
# check to ensure the input is an array given that the the attribute
|
|
109
|
+
# is documented as an array but the input is not
|
|
110
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
111
|
+
public_method("#{key}=").call(
|
|
112
|
+
attributes[self.class.attribute_map[key]]
|
|
113
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
117
|
+
public_method("#{key}=").call(
|
|
118
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
self
|
|
125
|
+
end
|
|
126
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
127
|
+
|
|
128
|
+
# Returns the string representation of the object
|
|
129
|
+
# @return [String] String presentation of the object
|
|
130
|
+
def to_s
|
|
131
|
+
to_hash.to_s
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Returns the object in the form of hash
|
|
135
|
+
# @return [Hash] Returns the object in the form of hash
|
|
136
|
+
def to_hash
|
|
137
|
+
hash = {}
|
|
138
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
139
|
+
value = public_method(attr).call
|
|
140
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
141
|
+
|
|
142
|
+
hash[param] = _to_hash(value)
|
|
143
|
+
end
|
|
144
|
+
hash
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
private
|
|
148
|
+
|
|
149
|
+
# Outputs non-array value in the form of hash
|
|
150
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
151
|
+
# @param [Object] value Any valid value
|
|
152
|
+
# @return [Hash] Returns the value in the form of hash
|
|
153
|
+
def _to_hash(value)
|
|
154
|
+
if value.is_a?(Array)
|
|
155
|
+
value.compact.map { |v| _to_hash(v) }
|
|
156
|
+
elsif value.is_a?(Hash)
|
|
157
|
+
{}.tap do |hash|
|
|
158
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
159
|
+
end
|
|
160
|
+
elsif value.respond_to? :to_hash
|
|
161
|
+
value.to_hash
|
|
162
|
+
else
|
|
163
|
+
value
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|