oci 2.5.10 → 2.5.11
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 +4 -1
- data/lib/oci.rb +3 -0
- data/lib/oci/budget/budget.rb +1 -0
- data/lib/oci/budget/budget_client.rb +21 -1
- data/lib/oci/budget/models/budget.rb +52 -2
- data/lib/oci/budget/models/budget_summary.rb +52 -2
- data/lib/oci/budget/models/create_budget_details.rb +55 -2
- data/lib/oci/budget/models/target_type.rb +10 -0
- data/lib/oci/core/blockstorage_client.rb +18 -6
- data/lib/oci/core/compute_client.rb +75 -0
- data/lib/oci/core/compute_management_client.rb +4 -1
- data/lib/oci/core/core.rb +12 -0
- data/lib/oci/core/models/add_security_rule_details.rb +2 -2
- data/lib/oci/core/models/boot_volume_backup.rb +19 -1
- data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_boot_volume_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_cpe_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_cross_connect_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_cross_connect_group_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_instance_compartment_details.rb +154 -0
- data/lib/oci/core/models/change_ip_sec_connection_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_remote_peering_connection_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_virtual_circuit_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_volume_backup_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_volume_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_volume_group_compartment_details.rb +2 -2
- data/lib/oci/core/models/copy_volume_backup_details.rb +27 -4
- data/lib/oci/core/models/create_cross_connect_details.rb +37 -1
- data/lib/oci/core/models/create_cross_connect_group_details.rb +40 -4
- data/lib/oci/core/models/create_instance_configuration_base.rb +250 -0
- data/lib/oci/core/models/create_instance_configuration_details.rb +15 -57
- data/lib/oci/core/models/create_instance_configuration_from_instance_details.rb +179 -0
- data/lib/oci/core/models/create_ipv6_details.rb +249 -0
- data/lib/oci/core/models/create_remote_peering_connection_details.rb +40 -4
- data/lib/oci/core/models/create_service_gateway_details.rb +23 -1
- data/lib/oci/core/models/create_subnet_details.rb +24 -1
- data/lib/oci/core/models/create_vcn_details.rb +56 -4
- data/lib/oci/core/models/create_virtual_circuit_details.rb +38 -2
- data/lib/oci/core/models/cross_connect.rb +37 -1
- data/lib/oci/core/models/cross_connect_group.rb +37 -1
- data/lib/oci/core/models/cross_connect_mapping.rb +50 -1
- data/lib/oci/core/models/egress_security_rule.rb +10 -7
- data/lib/oci/core/models/ingress_security_rule.rb +10 -7
- data/lib/oci/core/models/instance.rb +1 -0
- data/lib/oci/core/models/ipv6.rb +375 -0
- data/lib/oci/core/models/private_ip.rb +1 -0
- data/lib/oci/core/models/remote_peering_connection.rb +37 -1
- data/lib/oci/core/models/route_rule.rb +4 -1
- data/lib/oci/core/models/security_rule.rb +2 -2
- data/lib/oci/core/models/service_gateway.rb +18 -1
- data/lib/oci/core/models/subnet.rb +56 -1
- data/lib/oci/core/models/update_cross_connect_details.rb +37 -1
- data/lib/oci/core/models/update_cross_connect_group_details.rb +40 -4
- data/lib/oci/core/models/update_ipv6_details.rb +229 -0
- data/lib/oci/core/models/update_remote_peering_connection_details.rb +40 -4
- data/lib/oci/core/models/update_security_rule_details.rb +2 -2
- data/lib/oci/core/models/update_service_gateway_details.rb +18 -1
- data/lib/oci/core/models/update_virtual_circuit_details.rb +37 -1
- data/lib/oci/core/models/vcn.rb +42 -1
- data/lib/oci/core/models/virtual_circuit.rb +37 -1
- data/lib/oci/core/models/volume_backup.rb +19 -1
- data/lib/oci/core/virtual_network_client.rb +744 -10
- data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
- data/lib/oci/database/database.rb +3 -0
- data/lib/oci/database/database_client.rb +320 -36
- data/lib/oci/database/models/autonomous_data_warehouse.rb +1 -0
- data/lib/oci/database/models/autonomous_data_warehouse_console_token_details.rb +164 -0
- data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +1 -0
- data/lib/oci/database/models/autonomous_database.rb +5 -3
- data/lib/oci/database/models/autonomous_database_connection_urls.rb +1 -1
- data/lib/oci/database/models/autonomous_database_console_token_details.rb +163 -0
- data/lib/oci/database/models/autonomous_database_summary.rb +5 -3
- data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +1 -3
- data/lib/oci/database/models/change_compartment_details.rb +155 -0
- data/lib/oci/database/models/create_autonomous_database_base.rb +5 -4
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +2 -5
- data/lib/oci/database/models/create_database_details.rb +1 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +2 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +2 -1
- data/lib/oci/database/models/db_system.rb +2 -5
- data/lib/oci/database/models/db_system_summary.rb +2 -5
- data/lib/oci/database/models/launch_db_system_base.rb +3 -5
- data/lib/oci/database/models/maintenance_window.rb +2 -1
- data/lib/oci/database/models/update_autonomous_database_details.rb +5 -3
- data/lib/oci/database/models/update_db_system_details.rb +2 -5
- data/lib/oci/dns/dns.rb +2 -0
- data/lib/oci/dns/dns_client.rb +138 -1
- data/lib/oci/dns/models/change_steering_policy_compartment_details.rb +155 -0
- data/lib/oci/dns/models/change_zone_compartment_details.rb +155 -0
- data/lib/oci/events/events.rb +34 -0
- data/lib/oci/events/events_client.rb +537 -0
- data/lib/oci/events/events_client_composite_operations.rb +145 -0
- data/lib/oci/events/models/action.rb +275 -0
- data/lib/oci/events/models/action_details.rb +222 -0
- data/lib/oci/events/models/action_details_list.rb +150 -0
- data/lib/oci/events/models/action_list.rb +151 -0
- data/lib/oci/events/models/change_rule_compartment_details.rb +156 -0
- data/lib/oci/events/models/create_faa_s_action_details.rb +170 -0
- data/lib/oci/events/models/create_notification_service_action_details.rb +170 -0
- data/lib/oci/events/models/create_rule_details.rb +284 -0
- data/lib/oci/events/models/create_streaming_service_action_details.rb +170 -0
- data/lib/oci/events/models/faa_s_action.rb +178 -0
- data/lib/oci/events/models/notification_service_action.rb +179 -0
- data/lib/oci/events/models/rule.rb +372 -0
- data/lib/oci/events/models/rule_summary.rb +321 -0
- data/lib/oci/events/models/streaming_service_action.rb +178 -0
- data/lib/oci/events/models/update_rule_details.rb +266 -0
- data/lib/oci/events/util.rb +2 -0
- data/lib/oci/functions/functions.rb +29 -0
- data/lib/oci/functions/functions_invoke_client.rb +237 -0
- data/lib/oci/functions/functions_invoke_client_composite_operations.rb +24 -0
- data/lib/oci/functions/functions_management_client.rb +851 -0
- data/lib/oci/functions/functions_management_client_composite_operations.rb +266 -0
- data/lib/oci/functions/models/application.rb +322 -0
- data/lib/oci/functions/models/application_summary.rb +281 -0
- data/lib/oci/functions/models/change_application_compartment_details.rb +156 -0
- data/lib/oci/functions/models/create_application_details.rb +236 -0
- data/lib/oci/functions/models/create_function_details.rb +280 -0
- data/lib/oci/functions/models/function.rb +397 -0
- data/lib/oci/functions/models/function_summary.rb +381 -0
- data/lib/oci/functions/models/update_application_details.rb +191 -0
- data/lib/oci/functions/models/update_function_details.rb +250 -0
- data/lib/oci/functions/util.rb +2 -0
- data/lib/oci/healthchecks/health_checks_client.rb +147 -1
- data/lib/oci/healthchecks/healthchecks.rb +2 -0
- data/lib/oci/healthchecks/models/change_http_monitor_compartment_details.rb +155 -0
- data/lib/oci/healthchecks/models/change_ping_monitor_compartment_details.rb +155 -0
- data/lib/oci/healthchecks/models/create_http_monitor_details.rb +2 -1
- data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +2 -1
- data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +2 -1
- data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +2 -1
- data/lib/oci/healthchecks/models/http_monitor.rb +2 -0
- data/lib/oci/healthchecks/models/http_probe.rb +2 -0
- data/lib/oci/healthchecks/models/ping_monitor.rb +2 -0
- data/lib/oci/healthchecks/models/ping_probe.rb +2 -0
- data/lib/oci/healthchecks/models/update_http_monitor_details.rb +2 -0
- data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +2 -0
- data/lib/oci/identity/identity.rb +1 -0
- data/lib/oci/identity/identity_client.rb +70 -0
- data/lib/oci/identity/identity_client_composite_operations.rb +50 -0
- data/lib/oci/identity/models/move_compartment_details.rb +155 -0
- data/lib/oci/key_management/key_management.rb +2 -0
- data/lib/oci/key_management/kms_management_client.rb +73 -0
- data/lib/oci/key_management/kms_vault_client.rb +73 -0
- data/lib/oci/key_management/models/change_key_compartment_details.rb +153 -0
- data/lib/oci/key_management/models/change_vault_compartment_details.rb +153 -0
- data/lib/oci/key_management/models/key.rb +1 -0
- data/lib/oci/key_management/models/key_summary.rb +1 -0
- data/lib/oci/key_management/models/vault.rb +1 -0
- data/lib/oci/key_management/models/vault_summary.rb +1 -0
- data/lib/oci/limits/limits.rb +23 -0
- data/lib/oci/limits/models/create_quota_details.rb +220 -0
- data/lib/oci/limits/models/quota.rb +287 -0
- data/lib/oci/limits/models/quota_summary.rb +273 -0
- data/lib/oci/limits/models/update_quota_details.rb +194 -0
- data/lib/oci/limits/quotas_client.rb +439 -0
- data/lib/oci/limits/quotas_client_composite_operations.rb +143 -0
- data/lib/oci/limits/util.rb +2 -0
- data/lib/oci/load_balancer/load_balancer.rb +9 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +139 -0
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
- data/lib/oci/load_balancer/models/allow_rule.rb +181 -0
- data/lib/oci/load_balancer/models/backend_set.rb +21 -4
- data/lib/oci/load_balancer/models/backend_set_details.rb +21 -4
- data/lib/oci/load_balancer/models/change_load_balancer_compartment_details.rb +156 -0
- data/lib/oci/load_balancer/models/control_access_using_http_methods_rule.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +21 -4
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +37 -1
- data/lib/oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.rb +334 -0
- data/lib/oci/load_balancer/models/listener_rule_summary.rb +166 -0
- data/lib/oci/load_balancer/models/rule.rb +4 -0
- data/lib/oci/load_balancer/models/rule_condition.rb +192 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +6 -0
- data/lib/oci/load_balancer/models/source_ip_address_condition.rb +167 -0
- data/lib/oci/load_balancer/models/source_vcn_id_condition.rb +169 -0
- data/lib/oci/load_balancer/models/source_vcn_ip_address_condition.rb +171 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +21 -4
- data/lib/oci/monitoring/models/alarm.rb +4 -3
- data/lib/oci/monitoring/models/alarm_summary.rb +4 -3
- data/lib/oci/monitoring/models/change_alarm_compartment_details.rb +155 -0
- data/lib/oci/monitoring/models/create_alarm_details.rb +4 -3
- data/lib/oci/monitoring/models/datapoint.rb +1 -1
- data/lib/oci/monitoring/models/list_metrics_details.rb +4 -4
- data/lib/oci/monitoring/models/metric_data.rb +14 -0
- data/lib/oci/monitoring/models/metric_data_details.rb +6 -4
- data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +3 -0
- data/lib/oci/monitoring/models/update_alarm_details.rb +4 -3
- data/lib/oci/monitoring/monitoring.rb +1 -0
- data/lib/oci/monitoring/monitoring_client.rb +140 -5
- data/lib/oci/ons/models/backoff_retry_policy.rb +2 -2
- data/lib/oci/ons/models/change_compartment_details.rb +156 -0
- data/lib/oci/ons/models/confirmation_result.rb +5 -6
- data/lib/oci/ons/models/create_topic_details.rb +1 -1
- data/lib/oci/ons/models/notification_topic.rb +2 -2
- data/lib/oci/ons/models/notification_topic_summary.rb +2 -2
- data/lib/oci/ons/models/subscription.rb +47 -4
- data/lib/oci/ons/models/subscription_summary.rb +19 -3
- data/lib/oci/ons/notification_control_plane_client.rb +95 -8
- data/lib/oci/ons/notification_data_plane_client.rb +109 -8
- data/lib/oci/ons/ons.rb +1 -0
- data/lib/oci/regions.rb +3 -0
- data/lib/oci/streaming/models/change_stream_compartment_details.rb +155 -0
- data/lib/oci/streaming/stream_admin_client.rb +58 -0
- data/lib/oci/streaming/streaming.rb +1 -0
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule_criteria.rb +14 -2
- data/lib/oci/waas/models/change_certificate_compartment_details.rb +154 -0
- data/lib/oci/waas/models/change_waas_policy_compartment_details.rb +154 -0
- data/lib/oci/waas/models/create_certificate_details.rb +2 -2
- data/lib/oci/waas/models/protection_rule_exclusion.rb +16 -1
- data/lib/oci/waas/models/protection_settings.rb +9 -5
- data/lib/oci/waas/models/waas_policy.rb +1 -1
- data/lib/oci/waas/models/waf_config_details.rb +8 -8
- data/lib/oci/waas/models/waf_log.rb +40 -19
- data/lib/oci/waas/waas.rb +2 -0
- data/lib/oci/waas/waas_client.rb +155 -27
- data/lib/oci/work_requests/models/work_request.rb +14 -8
- data/lib/oci/work_requests/models/work_request_error.rb +3 -3
- data/lib/oci/work_requests/models/work_request_log_entry.rb +2 -2
- data/lib/oci/work_requests/models/work_request_resource.rb +9 -7
- data/lib/oci/work_requests/models/work_request_summary.rb +12 -6
- data/lib/oci/work_requests/work_request_client.rb +33 -16
- metadata +81 -2
|
@@ -9,6 +9,11 @@ module OCI
|
|
|
9
9
|
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
|
10
10
|
#
|
|
11
11
|
class LoadBalancer::Models::CreateLoadBalancerDetails
|
|
12
|
+
IP_MODE_ENUM = [
|
|
13
|
+
IP_MODE_IPV4 = 'IPV4'.freeze,
|
|
14
|
+
IP_MODE_IPV6 = 'IPV6'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
12
17
|
# **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment in which to create the load balancer.
|
|
13
18
|
# @return [String]
|
|
14
19
|
attr_accessor :compartment_id
|
|
@@ -45,6 +50,17 @@ module OCI
|
|
|
45
50
|
# @return [BOOLEAN]
|
|
46
51
|
attr_accessor :is_private
|
|
47
52
|
|
|
53
|
+
# Whether the load balancer has an IPv4 or IPv6 IP address.
|
|
54
|
+
#
|
|
55
|
+
# If \"IPV4\", the service assigns an IPv4 address and the load balancer supports IPv4 traffic.
|
|
56
|
+
#
|
|
57
|
+
# If \"IPV6\", the service assigns an IPv6 address and the load balancer supports IPv6 traffic.
|
|
58
|
+
#
|
|
59
|
+
# Example: \"ipMode\":\"IPV6\"
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
attr_reader :ip_mode
|
|
63
|
+
|
|
48
64
|
# @return [Hash<String, OCI::LoadBalancer::Models::ListenerDetails>]
|
|
49
65
|
attr_accessor :listeners
|
|
50
66
|
|
|
@@ -96,6 +112,7 @@ module OCI
|
|
|
96
112
|
'display_name': :'displayName',
|
|
97
113
|
'shape_name': :'shapeName',
|
|
98
114
|
'is_private': :'isPrivate',
|
|
115
|
+
'ip_mode': :'ipMode',
|
|
99
116
|
'listeners': :'listeners',
|
|
100
117
|
'hostnames': :'hostnames',
|
|
101
118
|
'backend_sets': :'backendSets',
|
|
@@ -118,6 +135,7 @@ module OCI
|
|
|
118
135
|
'display_name': :'String',
|
|
119
136
|
'shape_name': :'String',
|
|
120
137
|
'is_private': :'BOOLEAN',
|
|
138
|
+
'ip_mode': :'String',
|
|
121
139
|
'listeners': :'Hash<String, OCI::LoadBalancer::Models::ListenerDetails>',
|
|
122
140
|
'hostnames': :'Hash<String, OCI::LoadBalancer::Models::HostnameDetails>',
|
|
123
141
|
'backend_sets': :'Hash<String, OCI::LoadBalancer::Models::BackendSetDetails>',
|
|
@@ -142,6 +160,7 @@ module OCI
|
|
|
142
160
|
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
143
161
|
# @option attributes [String] :shape_name The value to assign to the {#shape_name} property
|
|
144
162
|
# @option attributes [BOOLEAN] :is_private The value to assign to the {#is_private} property
|
|
163
|
+
# @option attributes [String] :ip_mode The value to assign to the {#ip_mode} property
|
|
145
164
|
# @option attributes [Hash<String, OCI::LoadBalancer::Models::ListenerDetails>] :listeners The value to assign to the {#listeners} property
|
|
146
165
|
# @option attributes [Hash<String, OCI::LoadBalancer::Models::HostnameDetails>] :hostnames The value to assign to the {#hostnames} property
|
|
147
166
|
# @option attributes [Hash<String, OCI::LoadBalancer::Models::BackendSetDetails>] :backend_sets The value to assign to the {#backend_sets} property
|
|
@@ -184,6 +203,14 @@ module OCI
|
|
|
184
203
|
self.is_private = attributes[:'is_private'] unless attributes[:'is_private'].nil?
|
|
185
204
|
self.is_private = false if is_private.nil? && !attributes.key?(:'isPrivate') && !attributes.key?(:'is_private') # rubocop:disable Style/StringLiterals
|
|
186
205
|
|
|
206
|
+
self.ip_mode = attributes[:'ipMode'] if attributes[:'ipMode']
|
|
207
|
+
self.ip_mode = "IPV4" if ip_mode.nil? && !attributes.key?(:'ipMode') # rubocop:disable Style/StringLiterals
|
|
208
|
+
|
|
209
|
+
raise 'You cannot provide both :ipMode and :ip_mode' if attributes.key?(:'ipMode') && attributes.key?(:'ip_mode')
|
|
210
|
+
|
|
211
|
+
self.ip_mode = attributes[:'ip_mode'] if attributes[:'ip_mode']
|
|
212
|
+
self.ip_mode = "IPV4" if ip_mode.nil? && !attributes.key?(:'ipMode') && !attributes.key?(:'ip_mode') # rubocop:disable Style/StringLiterals
|
|
213
|
+
|
|
187
214
|
self.listeners = attributes[:'listeners'] if attributes[:'listeners']
|
|
188
215
|
|
|
189
216
|
self.hostnames = attributes[:'hostnames'] if attributes[:'hostnames']
|
|
@@ -235,6 +262,14 @@ module OCI
|
|
|
235
262
|
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
236
263
|
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
237
264
|
|
|
265
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
266
|
+
# @param [Object] ip_mode Object to be assigned
|
|
267
|
+
def ip_mode=(ip_mode)
|
|
268
|
+
raise "Invalid value for 'ip_mode': this must be one of the values in IP_MODE_ENUM." if ip_mode && !IP_MODE_ENUM.include?(ip_mode)
|
|
269
|
+
|
|
270
|
+
@ip_mode = ip_mode
|
|
271
|
+
end
|
|
272
|
+
|
|
238
273
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
239
274
|
|
|
240
275
|
|
|
@@ -248,6 +283,7 @@ module OCI
|
|
|
248
283
|
display_name == other.display_name &&
|
|
249
284
|
shape_name == other.shape_name &&
|
|
250
285
|
is_private == other.is_private &&
|
|
286
|
+
ip_mode == other.ip_mode &&
|
|
251
287
|
listeners == other.listeners &&
|
|
252
288
|
hostnames == other.hostnames &&
|
|
253
289
|
backend_sets == other.backend_sets &&
|
|
@@ -273,7 +309,7 @@ module OCI
|
|
|
273
309
|
# Calculates hash code according to all attributes.
|
|
274
310
|
# @return [Fixnum] Hash code
|
|
275
311
|
def hash
|
|
276
|
-
[compartment_id, display_name, shape_name, is_private, listeners, hostnames, backend_sets, network_security_group_ids, subnet_ids, certificates, path_route_sets, freeform_tags, defined_tags, rule_sets].hash
|
|
312
|
+
[compartment_id, display_name, shape_name, is_private, ip_mode, listeners, hostnames, backend_sets, network_security_group_ids, subnet_ids, certificates, path_route_sets, freeform_tags, defined_tags, rule_sets].hash
|
|
277
313
|
end
|
|
278
314
|
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
279
315
|
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
|
6
|
+
module OCI
|
|
7
|
+
# The configuration details for implementing load balancer cookie session persistence (LB cookie stickiness).
|
|
8
|
+
#
|
|
9
|
+
# Session persistence enables the Load Balancing service to direct all requests that originate from a single logical
|
|
10
|
+
# client to a single backend web server. For more information, see
|
|
11
|
+
# [Session Persistence](https://docs.cloud.oracle.com/Content/Balance/Reference/sessionpersistence.htm).
|
|
12
|
+
#
|
|
13
|
+
# When you configure LB cookie stickiness, the load balancer inserts a cookie into the response. The parameters configured
|
|
14
|
+
# in the cookie enable session stickiness. This method is useful when you have applications and Web backend services
|
|
15
|
+
# that cannot generate their own cookies.
|
|
16
|
+
#
|
|
17
|
+
# Path route rules take precedence to determine the target backend server. The load balancer verfies that session stickiness
|
|
18
|
+
# is enabled for the backend server and that the cookie configuration (domain, path, and cookie hash) is valid for the
|
|
19
|
+
# target. The system ignores invalid cookies.
|
|
20
|
+
#
|
|
21
|
+
# To disable LB cookie stickiness on a running load balancer, use the
|
|
22
|
+
# {#update_backend_set update_backend_set} operation and specify `null` for the
|
|
23
|
+
# `LBCookieSessionPersistenceConfigurationDetails` object.
|
|
24
|
+
#
|
|
25
|
+
# Example: `LBCookieSessionPersistenceConfigurationDetails: null`
|
|
26
|
+
#
|
|
27
|
+
# **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails`
|
|
28
|
+
# (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
|
|
29
|
+
#
|
|
30
|
+
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
|
31
|
+
#
|
|
32
|
+
class LoadBalancer::Models::LBCookieSessionPersistenceConfigurationDetails
|
|
33
|
+
# The name of the cookie inserted by the load balancer. If this field is not configured, the cookie name defaults
|
|
34
|
+
# to \"X-Oracle-BMC-LBS-Route\".
|
|
35
|
+
#
|
|
36
|
+
# Example: `example_cookie`
|
|
37
|
+
#
|
|
38
|
+
# **Notes:**
|
|
39
|
+
#
|
|
40
|
+
# * Ensure that the cookie name used at the backend application servers is different from the cookie name used
|
|
41
|
+
# at the load balancer. To minimize the chance of name collision, Oracle recommends that you use a prefix
|
|
42
|
+
# such as \"X-Oracle-OCI-\" for this field.
|
|
43
|
+
#
|
|
44
|
+
# * If a backend server and the load balancer both insert cookies with the same name, the client or browser
|
|
45
|
+
# behavior can vary depending on the domain and path values associated with the cookie. If the name, domain,
|
|
46
|
+
# and path values of the `Set-cookie` generated by a backend server and the `Set-cookie` generated by the
|
|
47
|
+
# load balancer are all the same, the client or browser treats them as one cookie and returns only one of
|
|
48
|
+
# the cookie values in subsequent requests. If both `Set-cookie` names are the same, but the domain and path
|
|
49
|
+
# names are different, the client or browser treats them as two different cookies.
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
attr_accessor :cookie_name
|
|
53
|
+
|
|
54
|
+
# Whether the load balancer is prevented from directing traffic from a persistent session client to
|
|
55
|
+
# a different backend server if the original server is unavailable. Defaults to false.
|
|
56
|
+
#
|
|
57
|
+
# Example: `false`
|
|
58
|
+
#
|
|
59
|
+
# @return [BOOLEAN]
|
|
60
|
+
attr_accessor :disable_fallback
|
|
61
|
+
|
|
62
|
+
# The domain in which the cookie is valid. The `Set-cookie` header inserted by the load balancer contains a
|
|
63
|
+
# domain attribute with the specified value.
|
|
64
|
+
#
|
|
65
|
+
# This attribute has no default value. If you do not specify a value, the load balancer does not insert the domain
|
|
66
|
+
# attribute into the `Set-cookie` header.
|
|
67
|
+
#
|
|
68
|
+
# **Notes:**
|
|
69
|
+
#
|
|
70
|
+
# * [RFC 6265 - HTTP State Management Mechanism](https://www.ietf.org/rfc/rfc6265.txt) describes client and
|
|
71
|
+
# browser behavior when the domain attribute is present or not present in the `Set-cookie` header.
|
|
72
|
+
#
|
|
73
|
+
# If the value of the `Domain` attribute is `example.com` in the `Set-cookie` header, the client includes
|
|
74
|
+
# the same cookie in the `Cookie` header when making HTTP requests to `example.com`, `www.example.com`, and
|
|
75
|
+
# `www.abc.example.com`. If the `Domain` attribute is not present, the client returns the cookie only for
|
|
76
|
+
# the domain to which the origianl request was made.
|
|
77
|
+
#
|
|
78
|
+
# * Ensure that this attribute specifies the correct domain value. If the `Domain` attribute in the `Set-cookie`
|
|
79
|
+
# header does not include the domain to which the original request was made, the client or browser might reject
|
|
80
|
+
# the cookie. As specified in RFC 6265, the client accepts a cookie with the `Domain` attribute value `example.com`
|
|
81
|
+
# or `www.example.com` sent from `www.example.com`. It does not accept a cookie with the `Domain` attribute
|
|
82
|
+
# `abc.example.com` or `www.abc.example.com` sent from `www.example.com`.
|
|
83
|
+
#
|
|
84
|
+
# Example: `example.com`
|
|
85
|
+
#
|
|
86
|
+
# @return [String]
|
|
87
|
+
attr_accessor :domain
|
|
88
|
+
|
|
89
|
+
# The path in which the cookie is valid. The `Set-cookie header` inserted by the load balancer contains a `Path`
|
|
90
|
+
# attribute with the specified value.
|
|
91
|
+
#
|
|
92
|
+
# Clients include the cookie in an HTTP request only if the path portion of the request-uri matches, or is a
|
|
93
|
+
# subdirectory of, the cookie's `Path` attribute.
|
|
94
|
+
#
|
|
95
|
+
# The default value is `/`.
|
|
96
|
+
#
|
|
97
|
+
# Example: `/example`
|
|
98
|
+
#
|
|
99
|
+
# @return [String]
|
|
100
|
+
attr_accessor :path
|
|
101
|
+
|
|
102
|
+
# The amount of time the cookie remains valid. The `Set-cookie` header inserted by the load balancer contains
|
|
103
|
+
# a `Max-Age` attribute with the specified value.
|
|
104
|
+
#
|
|
105
|
+
# The specified value must be at least one second. There is no default value for this attribute. If you do not
|
|
106
|
+
# specify a value, the load balancer does not include the `Max-Age` attribute in the `Set-cookie` header. In
|
|
107
|
+
# most cases, the client or browser retains the cookie until the current session ends, as defined by the client.
|
|
108
|
+
#
|
|
109
|
+
# Example: `3600`
|
|
110
|
+
#
|
|
111
|
+
# @return [Integer]
|
|
112
|
+
attr_accessor :max_age_in_seconds
|
|
113
|
+
|
|
114
|
+
# Whether the `Set-cookie` header should contain the `Secure` attribute. If `true`, the `Set-cookie` header
|
|
115
|
+
# inserted by the load balancer contains the `Secure` attribute, which directs the client or browser to send the
|
|
116
|
+
# cookie only using a secure protocol.
|
|
117
|
+
#
|
|
118
|
+
# **Note:** If you set this field to `true`, you cannot associate the corresponding backend set with an HTTP
|
|
119
|
+
# listener.
|
|
120
|
+
#
|
|
121
|
+
# Example: `true`
|
|
122
|
+
#
|
|
123
|
+
# @return [BOOLEAN]
|
|
124
|
+
attr_accessor :is_secure
|
|
125
|
+
|
|
126
|
+
# Whether the `Set-cookie` header should contain the `HttpOnly` attribute. If `true`, the `Set-cookie` header
|
|
127
|
+
# inserted by the load balancer contains the `HttpOnly` attribute, which limits the scope of the cookie to HTTP
|
|
128
|
+
# requests. This attribute directs the client or browser to omit the cookie when providing access to cookies
|
|
129
|
+
# through non-HTTP APIs. For example, it restricts the cookie from JavaScript channels.
|
|
130
|
+
#
|
|
131
|
+
# Example: `true`
|
|
132
|
+
#
|
|
133
|
+
# @return [BOOLEAN]
|
|
134
|
+
attr_accessor :is_http_only
|
|
135
|
+
|
|
136
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
137
|
+
def self.attribute_map
|
|
138
|
+
{
|
|
139
|
+
# rubocop:disable Style/SymbolLiteral
|
|
140
|
+
'cookie_name': :'cookieName',
|
|
141
|
+
'disable_fallback': :'disableFallback',
|
|
142
|
+
'domain': :'domain',
|
|
143
|
+
'path': :'path',
|
|
144
|
+
'max_age_in_seconds': :'maxAgeInSeconds',
|
|
145
|
+
'is_secure': :'isSecure',
|
|
146
|
+
'is_http_only': :'isHttpOnly'
|
|
147
|
+
# rubocop:enable Style/SymbolLiteral
|
|
148
|
+
}
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Attribute type mapping.
|
|
152
|
+
def self.swagger_types
|
|
153
|
+
{
|
|
154
|
+
# rubocop:disable Style/SymbolLiteral
|
|
155
|
+
'cookie_name': :'String',
|
|
156
|
+
'disable_fallback': :'BOOLEAN',
|
|
157
|
+
'domain': :'String',
|
|
158
|
+
'path': :'String',
|
|
159
|
+
'max_age_in_seconds': :'Integer',
|
|
160
|
+
'is_secure': :'BOOLEAN',
|
|
161
|
+
'is_http_only': :'BOOLEAN'
|
|
162
|
+
# rubocop:enable Style/SymbolLiteral
|
|
163
|
+
}
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
167
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
# Initializes the object
|
|
171
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
172
|
+
# @option attributes [String] :cookie_name The value to assign to the {#cookie_name} property
|
|
173
|
+
# @option attributes [BOOLEAN] :disable_fallback The value to assign to the {#disable_fallback} property
|
|
174
|
+
# @option attributes [String] :domain The value to assign to the {#domain} property
|
|
175
|
+
# @option attributes [String] :path The value to assign to the {#path} property
|
|
176
|
+
# @option attributes [Integer] :max_age_in_seconds The value to assign to the {#max_age_in_seconds} property
|
|
177
|
+
# @option attributes [BOOLEAN] :is_secure The value to assign to the {#is_secure} property
|
|
178
|
+
# @option attributes [BOOLEAN] :is_http_only The value to assign to the {#is_http_only} property
|
|
179
|
+
def initialize(attributes = {})
|
|
180
|
+
return unless attributes.is_a?(Hash)
|
|
181
|
+
|
|
182
|
+
# convert string to symbol for hash key
|
|
183
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
184
|
+
|
|
185
|
+
self.cookie_name = attributes[:'cookieName'] if attributes[:'cookieName']
|
|
186
|
+
|
|
187
|
+
raise 'You cannot provide both :cookieName and :cookie_name' if attributes.key?(:'cookieName') && attributes.key?(:'cookie_name')
|
|
188
|
+
|
|
189
|
+
self.cookie_name = attributes[:'cookie_name'] if attributes[:'cookie_name']
|
|
190
|
+
|
|
191
|
+
self.disable_fallback = attributes[:'disableFallback'] unless attributes[:'disableFallback'].nil?
|
|
192
|
+
self.disable_fallback = false if disable_fallback.nil? && !attributes.key?(:'disableFallback') # rubocop:disable Style/StringLiterals
|
|
193
|
+
|
|
194
|
+
raise 'You cannot provide both :disableFallback and :disable_fallback' if attributes.key?(:'disableFallback') && attributes.key?(:'disable_fallback')
|
|
195
|
+
|
|
196
|
+
self.disable_fallback = attributes[:'disable_fallback'] unless attributes[:'disable_fallback'].nil?
|
|
197
|
+
self.disable_fallback = false if disable_fallback.nil? && !attributes.key?(:'disableFallback') && !attributes.key?(:'disable_fallback') # rubocop:disable Style/StringLiterals
|
|
198
|
+
|
|
199
|
+
self.domain = attributes[:'domain'] if attributes[:'domain']
|
|
200
|
+
|
|
201
|
+
self.path = attributes[:'path'] if attributes[:'path']
|
|
202
|
+
|
|
203
|
+
self.max_age_in_seconds = attributes[:'maxAgeInSeconds'] if attributes[:'maxAgeInSeconds']
|
|
204
|
+
|
|
205
|
+
raise 'You cannot provide both :maxAgeInSeconds and :max_age_in_seconds' if attributes.key?(:'maxAgeInSeconds') && attributes.key?(:'max_age_in_seconds')
|
|
206
|
+
|
|
207
|
+
self.max_age_in_seconds = attributes[:'max_age_in_seconds'] if attributes[:'max_age_in_seconds']
|
|
208
|
+
|
|
209
|
+
self.is_secure = attributes[:'isSecure'] unless attributes[:'isSecure'].nil?
|
|
210
|
+
self.is_secure = true if is_secure.nil? && !attributes.key?(:'isSecure') # rubocop:disable Style/StringLiterals
|
|
211
|
+
|
|
212
|
+
raise 'You cannot provide both :isSecure and :is_secure' if attributes.key?(:'isSecure') && attributes.key?(:'is_secure')
|
|
213
|
+
|
|
214
|
+
self.is_secure = attributes[:'is_secure'] unless attributes[:'is_secure'].nil?
|
|
215
|
+
self.is_secure = true if is_secure.nil? && !attributes.key?(:'isSecure') && !attributes.key?(:'is_secure') # rubocop:disable Style/StringLiterals
|
|
216
|
+
|
|
217
|
+
self.is_http_only = attributes[:'isHttpOnly'] unless attributes[:'isHttpOnly'].nil?
|
|
218
|
+
self.is_http_only = true if is_http_only.nil? && !attributes.key?(:'isHttpOnly') # rubocop:disable Style/StringLiterals
|
|
219
|
+
|
|
220
|
+
raise 'You cannot provide both :isHttpOnly and :is_http_only' if attributes.key?(:'isHttpOnly') && attributes.key?(:'is_http_only')
|
|
221
|
+
|
|
222
|
+
self.is_http_only = attributes[:'is_http_only'] unless attributes[:'is_http_only'].nil?
|
|
223
|
+
self.is_http_only = true if is_http_only.nil? && !attributes.key?(:'isHttpOnly') && !attributes.key?(:'is_http_only') # rubocop:disable Style/StringLiterals
|
|
224
|
+
end
|
|
225
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
226
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
227
|
+
|
|
228
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
# Checks equality by comparing each attribute.
|
|
232
|
+
# @param [Object] other the other object to be compared
|
|
233
|
+
def ==(other)
|
|
234
|
+
return true if equal?(other)
|
|
235
|
+
|
|
236
|
+
self.class == other.class &&
|
|
237
|
+
cookie_name == other.cookie_name &&
|
|
238
|
+
disable_fallback == other.disable_fallback &&
|
|
239
|
+
domain == other.domain &&
|
|
240
|
+
path == other.path &&
|
|
241
|
+
max_age_in_seconds == other.max_age_in_seconds &&
|
|
242
|
+
is_secure == other.is_secure &&
|
|
243
|
+
is_http_only == other.is_http_only
|
|
244
|
+
end
|
|
245
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
246
|
+
|
|
247
|
+
# @see the `==` method
|
|
248
|
+
# @param [Object] other the other object to be compared
|
|
249
|
+
def eql?(other)
|
|
250
|
+
self == other
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
# Calculates hash code according to all attributes.
|
|
257
|
+
# @return [Fixnum] Hash code
|
|
258
|
+
def hash
|
|
259
|
+
[cookie_name, disable_fallback, domain, path, max_age_in_seconds, is_secure, is_http_only].hash
|
|
260
|
+
end
|
|
261
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
262
|
+
|
|
263
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
# Builds the object from hash
|
|
267
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
268
|
+
# @return [Object] Returns the model itself
|
|
269
|
+
def build_from_hash(attributes)
|
|
270
|
+
return nil unless attributes.is_a?(Hash)
|
|
271
|
+
|
|
272
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
273
|
+
if type =~ /^Array<(.*)>/i
|
|
274
|
+
# check to ensure the input is an array given that the the attribute
|
|
275
|
+
# is documented as an array but the input is not
|
|
276
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
277
|
+
public_method("#{key}=").call(
|
|
278
|
+
attributes[self.class.attribute_map[key]]
|
|
279
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
280
|
+
)
|
|
281
|
+
end
|
|
282
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
283
|
+
public_method("#{key}=").call(
|
|
284
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
285
|
+
)
|
|
286
|
+
end
|
|
287
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
self
|
|
291
|
+
end
|
|
292
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
293
|
+
|
|
294
|
+
# Returns the string representation of the object
|
|
295
|
+
# @return [String] String presentation of the object
|
|
296
|
+
def to_s
|
|
297
|
+
to_hash.to_s
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Returns the object in the form of hash
|
|
301
|
+
# @return [Hash] Returns the object in the form of hash
|
|
302
|
+
def to_hash
|
|
303
|
+
hash = {}
|
|
304
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
305
|
+
value = public_method(attr).call
|
|
306
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
307
|
+
|
|
308
|
+
hash[param] = _to_hash(value)
|
|
309
|
+
end
|
|
310
|
+
hash
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
private
|
|
314
|
+
|
|
315
|
+
# Outputs non-array value in the form of hash
|
|
316
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
317
|
+
# @param [Object] value Any valid value
|
|
318
|
+
# @return [Hash] Returns the value in the form of hash
|
|
319
|
+
def _to_hash(value)
|
|
320
|
+
if value.is_a?(Array)
|
|
321
|
+
value.compact.map { |v| _to_hash(v) }
|
|
322
|
+
elsif value.is_a?(Hash)
|
|
323
|
+
{}.tap do |hash|
|
|
324
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
325
|
+
end
|
|
326
|
+
elsif value.respond_to? :to_hash
|
|
327
|
+
value.to_hash
|
|
328
|
+
else
|
|
329
|
+
value
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
|
6
|
+
module OCI
|
|
7
|
+
# The attributes of a rule associated with the specified listener, and the name of the rule set that the rule
|
|
8
|
+
# belongs to.
|
|
9
|
+
#
|
|
10
|
+
class LoadBalancer::Models::ListenerRuleSummary
|
|
11
|
+
# A rule object that applies to the listener.
|
|
12
|
+
# @return [OCI::LoadBalancer::Models::Rule]
|
|
13
|
+
attr_accessor :rule
|
|
14
|
+
|
|
15
|
+
# The name of the rule set that the rule belongs to.
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :rule_set_name
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
# rubocop:disable Style/SymbolLiteral
|
|
24
|
+
'rule': :'rule',
|
|
25
|
+
'rule_set_name': :'ruleSetName'
|
|
26
|
+
# rubocop:enable Style/SymbolLiteral
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Attribute type mapping.
|
|
31
|
+
def self.swagger_types
|
|
32
|
+
{
|
|
33
|
+
# rubocop:disable Style/SymbolLiteral
|
|
34
|
+
'rule': :'OCI::LoadBalancer::Models::Rule',
|
|
35
|
+
'rule_set_name': :'String'
|
|
36
|
+
# rubocop:enable Style/SymbolLiteral
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
41
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Initializes the object
|
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
|
+
# @option attributes [OCI::LoadBalancer::Models::Rule] :rule The value to assign to the {#rule} property
|
|
47
|
+
# @option attributes [String] :rule_set_name The value to assign to the {#rule_set_name} property
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
return unless attributes.is_a?(Hash)
|
|
50
|
+
|
|
51
|
+
# convert string to symbol for hash key
|
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
53
|
+
|
|
54
|
+
self.rule = attributes[:'rule'] if attributes[:'rule']
|
|
55
|
+
|
|
56
|
+
self.rule_set_name = attributes[:'ruleSetName'] if attributes[:'ruleSetName']
|
|
57
|
+
|
|
58
|
+
raise 'You cannot provide both :ruleSetName and :rule_set_name' if attributes.key?(:'ruleSetName') && attributes.key?(:'rule_set_name')
|
|
59
|
+
|
|
60
|
+
self.rule_set_name = attributes[:'rule_set_name'] if attributes[:'rule_set_name']
|
|
61
|
+
end
|
|
62
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
63
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
64
|
+
|
|
65
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Checks equality by comparing each attribute.
|
|
69
|
+
# @param [Object] other the other object to be compared
|
|
70
|
+
def ==(other)
|
|
71
|
+
return true if equal?(other)
|
|
72
|
+
|
|
73
|
+
self.class == other.class &&
|
|
74
|
+
rule == other.rule &&
|
|
75
|
+
rule_set_name == other.rule_set_name
|
|
76
|
+
end
|
|
77
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
78
|
+
|
|
79
|
+
# @see the `==` method
|
|
80
|
+
# @param [Object] other the other object to be compared
|
|
81
|
+
def eql?(other)
|
|
82
|
+
self == other
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# Calculates hash code according to all attributes.
|
|
89
|
+
# @return [Fixnum] Hash code
|
|
90
|
+
def hash
|
|
91
|
+
[rule, rule_set_name].hash
|
|
92
|
+
end
|
|
93
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
94
|
+
|
|
95
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# Builds the object from hash
|
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
100
|
+
# @return [Object] Returns the model itself
|
|
101
|
+
def build_from_hash(attributes)
|
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
|
103
|
+
|
|
104
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
105
|
+
if type =~ /^Array<(.*)>/i
|
|
106
|
+
# check to ensure the input is an array given that the the attribute
|
|
107
|
+
# is documented as an array but the input is not
|
|
108
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
109
|
+
public_method("#{key}=").call(
|
|
110
|
+
attributes[self.class.attribute_map[key]]
|
|
111
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
115
|
+
public_method("#{key}=").call(
|
|
116
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
self
|
|
123
|
+
end
|
|
124
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
125
|
+
|
|
126
|
+
# Returns the string representation of the object
|
|
127
|
+
# @return [String] String presentation of the object
|
|
128
|
+
def to_s
|
|
129
|
+
to_hash.to_s
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Returns the object in the form of hash
|
|
133
|
+
# @return [Hash] Returns the object in the form of hash
|
|
134
|
+
def to_hash
|
|
135
|
+
hash = {}
|
|
136
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
137
|
+
value = public_method(attr).call
|
|
138
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
139
|
+
|
|
140
|
+
hash[param] = _to_hash(value)
|
|
141
|
+
end
|
|
142
|
+
hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
private
|
|
146
|
+
|
|
147
|
+
# Outputs non-array value in the form of hash
|
|
148
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
149
|
+
# @param [Object] value Any valid value
|
|
150
|
+
# @return [Hash] Returns the value in the form of hash
|
|
151
|
+
def _to_hash(value)
|
|
152
|
+
if value.is_a?(Array)
|
|
153
|
+
value.compact.map { |v| _to_hash(v) }
|
|
154
|
+
elsif value.is_a?(Hash)
|
|
155
|
+
{}.tap do |hash|
|
|
156
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
157
|
+
end
|
|
158
|
+
elsif value.respond_to? :to_hash
|
|
159
|
+
value.to_hash
|
|
160
|
+
else
|
|
161
|
+
value
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|