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