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,183 @@
|
|
|
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
|
+
# The data used to create a new SSL certificate.
|
|
8
|
+
#
|
|
9
|
+
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
|
10
|
+
class Waas::Models::UpdateCertificateDetails # rubocop:disable Metrics/LineLength
|
|
11
|
+
# A user-friendly name for the SSL certificate. The name can be changed and does not need to be unique.
|
|
12
|
+
# @return [String]
|
|
13
|
+
attr_accessor :display_name
|
|
14
|
+
|
|
15
|
+
# A simple key-value pair without any defined schema.
|
|
16
|
+
# @return [Hash<String, String>]
|
|
17
|
+
attr_accessor :freeform_tags
|
|
18
|
+
|
|
19
|
+
# A key-value pair with a defined schema that restricts the values of tags. These predefined keys are scoped to namespaces.
|
|
20
|
+
# @return [Hash<String, Hash<String, Object>>]
|
|
21
|
+
attr_accessor :defined_tags
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
# rubocop:disable Style/SymbolLiteral
|
|
27
|
+
'display_name': :'displayName',
|
|
28
|
+
'freeform_tags': :'freeformTags',
|
|
29
|
+
'defined_tags': :'definedTags'
|
|
30
|
+
# rubocop:enable Style/SymbolLiteral
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Attribute type mapping.
|
|
35
|
+
def self.swagger_types
|
|
36
|
+
{
|
|
37
|
+
# rubocop:disable Style/SymbolLiteral
|
|
38
|
+
'display_name': :'String',
|
|
39
|
+
'freeform_tags': :'Hash<String, String>',
|
|
40
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
|
41
|
+
# rubocop:enable Style/SymbolLiteral
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
46
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
52
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
|
53
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
return unless attributes.is_a?(Hash)
|
|
56
|
+
|
|
57
|
+
# convert string to symbol for hash key
|
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
59
|
+
|
|
60
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
61
|
+
|
|
62
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
63
|
+
|
|
64
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
65
|
+
|
|
66
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
|
67
|
+
|
|
68
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
|
69
|
+
|
|
70
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
|
71
|
+
|
|
72
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
|
73
|
+
|
|
74
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
|
75
|
+
|
|
76
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
|
77
|
+
end
|
|
78
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
79
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
80
|
+
|
|
81
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# Checks equality by comparing each attribute.
|
|
85
|
+
# @param [Object] other the other object to be compared
|
|
86
|
+
def ==(other)
|
|
87
|
+
return true if equal?(other)
|
|
88
|
+
|
|
89
|
+
self.class == other.class &&
|
|
90
|
+
display_name == other.display_name &&
|
|
91
|
+
freeform_tags == other.freeform_tags &&
|
|
92
|
+
defined_tags == other.defined_tags
|
|
93
|
+
end
|
|
94
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
95
|
+
|
|
96
|
+
# @see the `==` method
|
|
97
|
+
# @param [Object] other the other object to be compared
|
|
98
|
+
def eql?(other)
|
|
99
|
+
self == other
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# Calculates hash code according to all attributes.
|
|
106
|
+
# @return [Fixnum] Hash code
|
|
107
|
+
def hash
|
|
108
|
+
[display_name, freeform_tags, defined_tags].hash
|
|
109
|
+
end
|
|
110
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
111
|
+
|
|
112
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
|
|
121
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
122
|
+
if type =~ /^Array<(.*)>/i
|
|
123
|
+
# check to ensure the input is an array given that the the attribute
|
|
124
|
+
# is documented as an array but the input is not
|
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
126
|
+
public_method("#{key}=").call(
|
|
127
|
+
attributes[self.class.attribute_map[key]]
|
|
128
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
public_method("#{key}=").call(
|
|
133
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
self
|
|
140
|
+
end
|
|
141
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
142
|
+
|
|
143
|
+
# Returns the string representation of the object
|
|
144
|
+
# @return [String] String presentation of the object
|
|
145
|
+
def to_s
|
|
146
|
+
to_hash.to_s
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Returns the object in the form of hash
|
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
|
151
|
+
def to_hash
|
|
152
|
+
hash = {}
|
|
153
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
154
|
+
value = public_method(attr).call
|
|
155
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
private
|
|
163
|
+
|
|
164
|
+
# Outputs non-array value in the form of hash
|
|
165
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
166
|
+
# @param [Object] value Any valid value
|
|
167
|
+
# @return [Hash] Returns the value in the form of hash
|
|
168
|
+
def _to_hash(value)
|
|
169
|
+
if value.is_a?(Array)
|
|
170
|
+
value.compact.map { |v| _to_hash(v) }
|
|
171
|
+
elsif value.is_a?(Hash)
|
|
172
|
+
{}.tap do |hash|
|
|
173
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
174
|
+
end
|
|
175
|
+
elsif value.respond_to? :to_hash
|
|
176
|
+
value.to_hash
|
|
177
|
+
else
|
|
178
|
+
value
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -0,0 +1,233 @@
|
|
|
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
|
+
# Updates the configuration details of a WAAS policy.
|
|
8
|
+
#
|
|
9
|
+
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
|
10
|
+
class Waas::Models::UpdateWaasPolicyDetails # rubocop:disable Metrics/LineLength
|
|
11
|
+
# A user-friendly name for the WAAS policy. The name is can be changed and does not need to be unique.
|
|
12
|
+
# @return [String]
|
|
13
|
+
attr_accessor :display_name
|
|
14
|
+
|
|
15
|
+
# An array of additional domains protected by this WAAS policy.
|
|
16
|
+
# @return [Array<String>]
|
|
17
|
+
attr_accessor :additional_domains
|
|
18
|
+
|
|
19
|
+
# A map of host to origin for the web application. The key should be a customer friendly name for the host, ex. primary, secondary, etc.
|
|
20
|
+
# @return [Hash<String, OCI::Waas::Models::Origin>]
|
|
21
|
+
attr_accessor :origins
|
|
22
|
+
|
|
23
|
+
# @return [OCI::Waas::Models::PolicyConfig]
|
|
24
|
+
attr_accessor :policy_config
|
|
25
|
+
|
|
26
|
+
# @return [OCI::Waas::Models::WafConfig]
|
|
27
|
+
attr_accessor :waf_config
|
|
28
|
+
|
|
29
|
+
# A simple key-value pair without any defined schema.
|
|
30
|
+
# @return [Hash<String, String>]
|
|
31
|
+
attr_accessor :freeform_tags
|
|
32
|
+
|
|
33
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
|
34
|
+
# @return [Hash<String, Hash<String, Object>>]
|
|
35
|
+
attr_accessor :defined_tags
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
# rubocop:disable Style/SymbolLiteral
|
|
41
|
+
'display_name': :'displayName',
|
|
42
|
+
'additional_domains': :'additionalDomains',
|
|
43
|
+
'origins': :'origins',
|
|
44
|
+
'policy_config': :'policyConfig',
|
|
45
|
+
'waf_config': :'wafConfig',
|
|
46
|
+
'freeform_tags': :'freeformTags',
|
|
47
|
+
'defined_tags': :'definedTags'
|
|
48
|
+
# rubocop:enable Style/SymbolLiteral
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute type mapping.
|
|
53
|
+
def self.swagger_types
|
|
54
|
+
{
|
|
55
|
+
# rubocop:disable Style/SymbolLiteral
|
|
56
|
+
'display_name': :'String',
|
|
57
|
+
'additional_domains': :'Array<String>',
|
|
58
|
+
'origins': :'Hash<String, OCI::Waas::Models::Origin>',
|
|
59
|
+
'policy_config': :'OCI::Waas::Models::PolicyConfig',
|
|
60
|
+
'waf_config': :'OCI::Waas::Models::WafConfig',
|
|
61
|
+
'freeform_tags': :'Hash<String, String>',
|
|
62
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
|
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] :display_name The value to assign to the {#display_name} property
|
|
74
|
+
# @option attributes [Array<String>] :additional_domains The value to assign to the {#additional_domains} property
|
|
75
|
+
# @option attributes [Hash<String, OCI::Waas::Models::Origin>] :origins The value to assign to the {#origins} property
|
|
76
|
+
# @option attributes [OCI::Waas::Models::PolicyConfig] :policy_config The value to assign to the {#policy_config} property
|
|
77
|
+
# @option attributes [OCI::Waas::Models::WafConfig] :waf_config The value to assign to the {#waf_config} property
|
|
78
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
|
79
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
|
80
|
+
def initialize(attributes = {})
|
|
81
|
+
return unless attributes.is_a?(Hash)
|
|
82
|
+
|
|
83
|
+
# convert string to symbol for hash key
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
85
|
+
|
|
86
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
87
|
+
|
|
88
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
89
|
+
|
|
90
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
91
|
+
|
|
92
|
+
self.additional_domains = attributes[:'additionalDomains'] if attributes[:'additionalDomains']
|
|
93
|
+
|
|
94
|
+
raise 'You cannot provide both :additionalDomains and :additional_domains' if attributes.key?(:'additionalDomains') && attributes.key?(:'additional_domains')
|
|
95
|
+
|
|
96
|
+
self.additional_domains = attributes[:'additional_domains'] if attributes[:'additional_domains']
|
|
97
|
+
|
|
98
|
+
self.origins = attributes[:'origins'] if attributes[:'origins']
|
|
99
|
+
|
|
100
|
+
self.policy_config = attributes[:'policyConfig'] if attributes[:'policyConfig']
|
|
101
|
+
|
|
102
|
+
raise 'You cannot provide both :policyConfig and :policy_config' if attributes.key?(:'policyConfig') && attributes.key?(:'policy_config')
|
|
103
|
+
|
|
104
|
+
self.policy_config = attributes[:'policy_config'] if attributes[:'policy_config']
|
|
105
|
+
|
|
106
|
+
self.waf_config = attributes[:'wafConfig'] if attributes[:'wafConfig']
|
|
107
|
+
|
|
108
|
+
raise 'You cannot provide both :wafConfig and :waf_config' if attributes.key?(:'wafConfig') && attributes.key?(:'waf_config')
|
|
109
|
+
|
|
110
|
+
self.waf_config = attributes[:'waf_config'] if attributes[:'waf_config']
|
|
111
|
+
|
|
112
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
|
113
|
+
|
|
114
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
|
115
|
+
|
|
116
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
|
117
|
+
|
|
118
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
|
119
|
+
|
|
120
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
|
121
|
+
|
|
122
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
|
123
|
+
end
|
|
124
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
125
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
126
|
+
|
|
127
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] other the other object to be compared
|
|
132
|
+
def ==(other)
|
|
133
|
+
return true if equal?(other)
|
|
134
|
+
|
|
135
|
+
self.class == other.class &&
|
|
136
|
+
display_name == other.display_name &&
|
|
137
|
+
additional_domains == other.additional_domains &&
|
|
138
|
+
origins == other.origins &&
|
|
139
|
+
policy_config == other.policy_config &&
|
|
140
|
+
waf_config == other.waf_config &&
|
|
141
|
+
freeform_tags == other.freeform_tags &&
|
|
142
|
+
defined_tags == other.defined_tags
|
|
143
|
+
end
|
|
144
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
145
|
+
|
|
146
|
+
# @see the `==` method
|
|
147
|
+
# @param [Object] other the other object to be compared
|
|
148
|
+
def eql?(other)
|
|
149
|
+
self == other
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Fixnum] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[display_name, additional_domains, origins, policy_config, waf_config, freeform_tags, defined_tags].hash
|
|
159
|
+
end
|
|
160
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
161
|
+
|
|
162
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
# Builds the object from hash
|
|
166
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
167
|
+
# @return [Object] Returns the model itself
|
|
168
|
+
def build_from_hash(attributes)
|
|
169
|
+
return nil unless attributes.is_a?(Hash)
|
|
170
|
+
|
|
171
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
172
|
+
if type =~ /^Array<(.*)>/i
|
|
173
|
+
# check to ensure the input is an array given that the the attribute
|
|
174
|
+
# is documented as an array but the input is not
|
|
175
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
176
|
+
public_method("#{key}=").call(
|
|
177
|
+
attributes[self.class.attribute_map[key]]
|
|
178
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
182
|
+
public_method("#{key}=").call(
|
|
183
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
self
|
|
190
|
+
end
|
|
191
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
192
|
+
|
|
193
|
+
# Returns the string representation of the object
|
|
194
|
+
# @return [String] String presentation of the object
|
|
195
|
+
def to_s
|
|
196
|
+
to_hash.to_s
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Returns the object in the form of hash
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_hash
|
|
202
|
+
hash = {}
|
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
204
|
+
value = public_method(attr).call
|
|
205
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
206
|
+
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
private
|
|
213
|
+
|
|
214
|
+
# Outputs non-array value in the form of hash
|
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
216
|
+
# @param [Object] value Any valid value
|
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
|
218
|
+
def _to_hash(value)
|
|
219
|
+
if value.is_a?(Array)
|
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
|
221
|
+
elsif value.is_a?(Hash)
|
|
222
|
+
{}.tap do |hash|
|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
224
|
+
end
|
|
225
|
+
elsif value.respond_to? :to_hash
|
|
226
|
+
value.to_hash
|
|
227
|
+
else
|
|
228
|
+
value
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -0,0 +1,331 @@
|
|
|
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 details of a Web Application Acceleration and Security (WAAS) policy. A policy describes how the WAAS service should operate for the configured web application.
|
|
9
|
+
#
|
|
10
|
+
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
|
11
|
+
class Waas::Models::WaasPolicy # rubocop:disable Metrics/LineLength
|
|
12
|
+
LIFECYCLE_STATE_ENUM = [
|
|
13
|
+
LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
|
|
14
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
|
|
15
|
+
LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
|
|
16
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
|
|
17
|
+
LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
|
|
18
|
+
LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
|
|
19
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
20
|
+
].freeze
|
|
21
|
+
|
|
22
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :id
|
|
25
|
+
|
|
26
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy's compartment.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :compartment_id
|
|
29
|
+
|
|
30
|
+
# The user-friendly name of the WAAS policy. The name can be changed and does not need to be unique.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :display_name
|
|
33
|
+
|
|
34
|
+
# The web application domain that the WAAS policy protects.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :domain
|
|
37
|
+
|
|
38
|
+
# An array of additional domains for this web application.
|
|
39
|
+
# @return [Array<String>]
|
|
40
|
+
attr_accessor :additional_domains
|
|
41
|
+
|
|
42
|
+
# The CNAME record to add to your DNS configuration to route traffic for the domain, and all additional domains, through the WAF.
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :cname
|
|
45
|
+
|
|
46
|
+
# The current lifecycle state of the WAAS policy.
|
|
47
|
+
# @return [String]
|
|
48
|
+
attr_reader :lifecycle_state
|
|
49
|
+
|
|
50
|
+
# The date and time the policy was created, expressed in RFC 3339 timestamp format.
|
|
51
|
+
# @return [DateTime]
|
|
52
|
+
attr_accessor :time_created
|
|
53
|
+
|
|
54
|
+
# A map of host to origin for the web application. The key should be a customer friendly name for the host, ex. primary, secondary, etc.
|
|
55
|
+
# @return [Hash<String, OCI::Waas::Models::Origin>]
|
|
56
|
+
attr_accessor :origins
|
|
57
|
+
|
|
58
|
+
# @return [OCI::Waas::Models::PolicyConfig]
|
|
59
|
+
attr_accessor :policy_config
|
|
60
|
+
|
|
61
|
+
# @return [OCI::Waas::Models::WafConfig]
|
|
62
|
+
attr_accessor :waf_config
|
|
63
|
+
|
|
64
|
+
# A simple key-value pair without any defined schema.
|
|
65
|
+
# @return [Hash<String, String>]
|
|
66
|
+
attr_accessor :freeform_tags
|
|
67
|
+
|
|
68
|
+
# A key-value pair with a defined schema that restricts the values of tags. These predefined keys are scoped to namespaces.
|
|
69
|
+
# @return [Hash<String, Hash<String, Object>>]
|
|
70
|
+
attr_accessor :defined_tags
|
|
71
|
+
|
|
72
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
73
|
+
def self.attribute_map
|
|
74
|
+
{
|
|
75
|
+
# rubocop:disable Style/SymbolLiteral
|
|
76
|
+
'id': :'id',
|
|
77
|
+
'compartment_id': :'compartmentId',
|
|
78
|
+
'display_name': :'displayName',
|
|
79
|
+
'domain': :'domain',
|
|
80
|
+
'additional_domains': :'additionalDomains',
|
|
81
|
+
'cname': :'cname',
|
|
82
|
+
'lifecycle_state': :'lifecycleState',
|
|
83
|
+
'time_created': :'timeCreated',
|
|
84
|
+
'origins': :'origins',
|
|
85
|
+
'policy_config': :'policyConfig',
|
|
86
|
+
'waf_config': :'wafConfig',
|
|
87
|
+
'freeform_tags': :'freeformTags',
|
|
88
|
+
'defined_tags': :'definedTags'
|
|
89
|
+
# rubocop:enable Style/SymbolLiteral
|
|
90
|
+
}
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Attribute type mapping.
|
|
94
|
+
def self.swagger_types
|
|
95
|
+
{
|
|
96
|
+
# rubocop:disable Style/SymbolLiteral
|
|
97
|
+
'id': :'String',
|
|
98
|
+
'compartment_id': :'String',
|
|
99
|
+
'display_name': :'String',
|
|
100
|
+
'domain': :'String',
|
|
101
|
+
'additional_domains': :'Array<String>',
|
|
102
|
+
'cname': :'String',
|
|
103
|
+
'lifecycle_state': :'String',
|
|
104
|
+
'time_created': :'DateTime',
|
|
105
|
+
'origins': :'Hash<String, OCI::Waas::Models::Origin>',
|
|
106
|
+
'policy_config': :'OCI::Waas::Models::PolicyConfig',
|
|
107
|
+
'waf_config': :'OCI::Waas::Models::WafConfig',
|
|
108
|
+
'freeform_tags': :'Hash<String, String>',
|
|
109
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
|
110
|
+
# rubocop:enable Style/SymbolLiteral
|
|
111
|
+
}
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
115
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# Initializes the object
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
|
121
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
|
122
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
123
|
+
# @option attributes [String] :domain The value to assign to the {#domain} property
|
|
124
|
+
# @option attributes [Array<String>] :additional_domains The value to assign to the {#additional_domains} property
|
|
125
|
+
# @option attributes [String] :cname The value to assign to the {#cname} property
|
|
126
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
|
127
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
|
128
|
+
# @option attributes [Hash<String, OCI::Waas::Models::Origin>] :origins The value to assign to the {#origins} property
|
|
129
|
+
# @option attributes [OCI::Waas::Models::PolicyConfig] :policy_config The value to assign to the {#policy_config} property
|
|
130
|
+
# @option attributes [OCI::Waas::Models::WafConfig] :waf_config The value to assign to the {#waf_config} property
|
|
131
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
|
132
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
|
133
|
+
def initialize(attributes = {})
|
|
134
|
+
return unless attributes.is_a?(Hash)
|
|
135
|
+
|
|
136
|
+
# convert string to symbol for hash key
|
|
137
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
138
|
+
|
|
139
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
|
140
|
+
|
|
141
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
|
142
|
+
|
|
143
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
|
144
|
+
|
|
145
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
|
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.domain = attributes[:'domain'] if attributes[:'domain']
|
|
154
|
+
|
|
155
|
+
self.additional_domains = attributes[:'additionalDomains'] if attributes[:'additionalDomains']
|
|
156
|
+
|
|
157
|
+
raise 'You cannot provide both :additionalDomains and :additional_domains' if attributes.key?(:'additionalDomains') && attributes.key?(:'additional_domains')
|
|
158
|
+
|
|
159
|
+
self.additional_domains = attributes[:'additional_domains'] if attributes[:'additional_domains']
|
|
160
|
+
|
|
161
|
+
self.cname = attributes[:'cname'] if attributes[:'cname']
|
|
162
|
+
|
|
163
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
|
164
|
+
|
|
165
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
|
166
|
+
|
|
167
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
|
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.origins = attributes[:'origins'] if attributes[:'origins']
|
|
176
|
+
|
|
177
|
+
self.policy_config = attributes[:'policyConfig'] if attributes[:'policyConfig']
|
|
178
|
+
|
|
179
|
+
raise 'You cannot provide both :policyConfig and :policy_config' if attributes.key?(:'policyConfig') && attributes.key?(:'policy_config')
|
|
180
|
+
|
|
181
|
+
self.policy_config = attributes[:'policy_config'] if attributes[:'policy_config']
|
|
182
|
+
|
|
183
|
+
self.waf_config = attributes[:'wafConfig'] if attributes[:'wafConfig']
|
|
184
|
+
|
|
185
|
+
raise 'You cannot provide both :wafConfig and :waf_config' if attributes.key?(:'wafConfig') && attributes.key?(:'waf_config')
|
|
186
|
+
|
|
187
|
+
self.waf_config = attributes[:'waf_config'] if attributes[:'waf_config']
|
|
188
|
+
|
|
189
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
|
190
|
+
|
|
191
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
|
192
|
+
|
|
193
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
|
194
|
+
|
|
195
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
|
196
|
+
|
|
197
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
|
198
|
+
|
|
199
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
|
200
|
+
end
|
|
201
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
202
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
203
|
+
|
|
204
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
205
|
+
# @param [Object] lifecycle_state Object to be assigned
|
|
206
|
+
def lifecycle_state=(lifecycle_state)
|
|
207
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
208
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
|
209
|
+
# rubocop: disable Metrics/LineLength
|
|
210
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
211
|
+
# rubocop: enable Metrics/LineLength
|
|
212
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
|
213
|
+
else
|
|
214
|
+
@lifecycle_state = lifecycle_state
|
|
215
|
+
end
|
|
216
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
# Checks equality by comparing each attribute.
|
|
223
|
+
# @param [Object] other the other object to be compared
|
|
224
|
+
def ==(other)
|
|
225
|
+
return true if equal?(other)
|
|
226
|
+
|
|
227
|
+
self.class == other.class &&
|
|
228
|
+
id == other.id &&
|
|
229
|
+
compartment_id == other.compartment_id &&
|
|
230
|
+
display_name == other.display_name &&
|
|
231
|
+
domain == other.domain &&
|
|
232
|
+
additional_domains == other.additional_domains &&
|
|
233
|
+
cname == other.cname &&
|
|
234
|
+
lifecycle_state == other.lifecycle_state &&
|
|
235
|
+
time_created == other.time_created &&
|
|
236
|
+
origins == other.origins &&
|
|
237
|
+
policy_config == other.policy_config &&
|
|
238
|
+
waf_config == other.waf_config &&
|
|
239
|
+
freeform_tags == other.freeform_tags &&
|
|
240
|
+
defined_tags == other.defined_tags
|
|
241
|
+
end
|
|
242
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
243
|
+
|
|
244
|
+
# @see the `==` method
|
|
245
|
+
# @param [Object] other the other object to be compared
|
|
246
|
+
def eql?(other)
|
|
247
|
+
self == other
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
# Calculates hash code according to all attributes.
|
|
254
|
+
# @return [Fixnum] Hash code
|
|
255
|
+
def hash
|
|
256
|
+
[id, compartment_id, display_name, domain, additional_domains, cname, lifecycle_state, time_created, origins, policy_config, waf_config, freeform_tags, defined_tags].hash
|
|
257
|
+
end
|
|
258
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
259
|
+
|
|
260
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
# Builds the object from hash
|
|
264
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
265
|
+
# @return [Object] Returns the model itself
|
|
266
|
+
def build_from_hash(attributes)
|
|
267
|
+
return nil unless attributes.is_a?(Hash)
|
|
268
|
+
|
|
269
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
270
|
+
if type =~ /^Array<(.*)>/i
|
|
271
|
+
# check to ensure the input is an array given that the the attribute
|
|
272
|
+
# is documented as an array but the input is not
|
|
273
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
274
|
+
public_method("#{key}=").call(
|
|
275
|
+
attributes[self.class.attribute_map[key]]
|
|
276
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
277
|
+
)
|
|
278
|
+
end
|
|
279
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
280
|
+
public_method("#{key}=").call(
|
|
281
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
282
|
+
)
|
|
283
|
+
end
|
|
284
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
self
|
|
288
|
+
end
|
|
289
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
290
|
+
|
|
291
|
+
# Returns the string representation of the object
|
|
292
|
+
# @return [String] String presentation of the object
|
|
293
|
+
def to_s
|
|
294
|
+
to_hash.to_s
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Returns the object in the form of hash
|
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
|
299
|
+
def to_hash
|
|
300
|
+
hash = {}
|
|
301
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
302
|
+
value = public_method(attr).call
|
|
303
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
304
|
+
|
|
305
|
+
hash[param] = _to_hash(value)
|
|
306
|
+
end
|
|
307
|
+
hash
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
private
|
|
311
|
+
|
|
312
|
+
# Outputs non-array value in the form of hash
|
|
313
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
314
|
+
# @param [Object] value Any valid value
|
|
315
|
+
# @return [Hash] Returns the value in the form of hash
|
|
316
|
+
def _to_hash(value)
|
|
317
|
+
if value.is_a?(Array)
|
|
318
|
+
value.compact.map { |v| _to_hash(v) }
|
|
319
|
+
elsif value.is_a?(Hash)
|
|
320
|
+
{}.tap do |hash|
|
|
321
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
322
|
+
end
|
|
323
|
+
elsif value.respond_to? :to_hash
|
|
324
|
+
value.to_hash
|
|
325
|
+
else
|
|
326
|
+
value
|
|
327
|
+
end
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|