oci 2.5.10 → 2.5.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -1
  3. data/lib/oci.rb +3 -0
  4. data/lib/oci/budget/budget.rb +1 -0
  5. data/lib/oci/budget/budget_client.rb +21 -1
  6. data/lib/oci/budget/models/budget.rb +52 -2
  7. data/lib/oci/budget/models/budget_summary.rb +52 -2
  8. data/lib/oci/budget/models/create_budget_details.rb +55 -2
  9. data/lib/oci/budget/models/target_type.rb +10 -0
  10. data/lib/oci/core/blockstorage_client.rb +18 -6
  11. data/lib/oci/core/compute_client.rb +75 -0
  12. data/lib/oci/core/compute_management_client.rb +4 -1
  13. data/lib/oci/core/core.rb +12 -0
  14. data/lib/oci/core/models/add_security_rule_details.rb +2 -2
  15. data/lib/oci/core/models/boot_volume_backup.rb +19 -1
  16. data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +2 -2
  17. data/lib/oci/core/models/change_boot_volume_compartment_details.rb +2 -2
  18. data/lib/oci/core/models/change_cpe_compartment_details.rb +155 -0
  19. data/lib/oci/core/models/change_cross_connect_compartment_details.rb +155 -0
  20. data/lib/oci/core/models/change_cross_connect_group_compartment_details.rb +155 -0
  21. data/lib/oci/core/models/change_instance_compartment_details.rb +154 -0
  22. data/lib/oci/core/models/change_ip_sec_connection_compartment_details.rb +155 -0
  23. data/lib/oci/core/models/change_remote_peering_connection_compartment_details.rb +155 -0
  24. data/lib/oci/core/models/change_virtual_circuit_compartment_details.rb +155 -0
  25. data/lib/oci/core/models/change_volume_backup_compartment_details.rb +2 -2
  26. data/lib/oci/core/models/change_volume_compartment_details.rb +2 -2
  27. data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +2 -2
  28. data/lib/oci/core/models/change_volume_group_compartment_details.rb +2 -2
  29. data/lib/oci/core/models/copy_volume_backup_details.rb +27 -4
  30. data/lib/oci/core/models/create_cross_connect_details.rb +37 -1
  31. data/lib/oci/core/models/create_cross_connect_group_details.rb +40 -4
  32. data/lib/oci/core/models/create_instance_configuration_base.rb +250 -0
  33. data/lib/oci/core/models/create_instance_configuration_details.rb +15 -57
  34. data/lib/oci/core/models/create_instance_configuration_from_instance_details.rb +179 -0
  35. data/lib/oci/core/models/create_ipv6_details.rb +249 -0
  36. data/lib/oci/core/models/create_remote_peering_connection_details.rb +40 -4
  37. data/lib/oci/core/models/create_service_gateway_details.rb +23 -1
  38. data/lib/oci/core/models/create_subnet_details.rb +24 -1
  39. data/lib/oci/core/models/create_vcn_details.rb +56 -4
  40. data/lib/oci/core/models/create_virtual_circuit_details.rb +38 -2
  41. data/lib/oci/core/models/cross_connect.rb +37 -1
  42. data/lib/oci/core/models/cross_connect_group.rb +37 -1
  43. data/lib/oci/core/models/cross_connect_mapping.rb +50 -1
  44. data/lib/oci/core/models/egress_security_rule.rb +10 -7
  45. data/lib/oci/core/models/ingress_security_rule.rb +10 -7
  46. data/lib/oci/core/models/instance.rb +1 -0
  47. data/lib/oci/core/models/ipv6.rb +375 -0
  48. data/lib/oci/core/models/private_ip.rb +1 -0
  49. data/lib/oci/core/models/remote_peering_connection.rb +37 -1
  50. data/lib/oci/core/models/route_rule.rb +4 -1
  51. data/lib/oci/core/models/security_rule.rb +2 -2
  52. data/lib/oci/core/models/service_gateway.rb +18 -1
  53. data/lib/oci/core/models/subnet.rb +56 -1
  54. data/lib/oci/core/models/update_cross_connect_details.rb +37 -1
  55. data/lib/oci/core/models/update_cross_connect_group_details.rb +40 -4
  56. data/lib/oci/core/models/update_ipv6_details.rb +229 -0
  57. data/lib/oci/core/models/update_remote_peering_connection_details.rb +40 -4
  58. data/lib/oci/core/models/update_security_rule_details.rb +2 -2
  59. data/lib/oci/core/models/update_service_gateway_details.rb +18 -1
  60. data/lib/oci/core/models/update_virtual_circuit_details.rb +37 -1
  61. data/lib/oci/core/models/vcn.rb +42 -1
  62. data/lib/oci/core/models/virtual_circuit.rb +37 -1
  63. data/lib/oci/core/models/volume_backup.rb +19 -1
  64. data/lib/oci/core/virtual_network_client.rb +744 -10
  65. data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
  66. data/lib/oci/database/database.rb +3 -0
  67. data/lib/oci/database/database_client.rb +320 -36
  68. data/lib/oci/database/models/autonomous_data_warehouse.rb +1 -0
  69. data/lib/oci/database/models/autonomous_data_warehouse_console_token_details.rb +164 -0
  70. data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +1 -0
  71. data/lib/oci/database/models/autonomous_database.rb +5 -3
  72. data/lib/oci/database/models/autonomous_database_connection_urls.rb +1 -1
  73. data/lib/oci/database/models/autonomous_database_console_token_details.rb +163 -0
  74. data/lib/oci/database/models/autonomous_database_summary.rb +5 -3
  75. data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +1 -3
  76. data/lib/oci/database/models/change_compartment_details.rb +155 -0
  77. data/lib/oci/database/models/create_autonomous_database_base.rb +5 -4
  78. data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +2 -5
  79. data/lib/oci/database/models/create_database_details.rb +1 -1
  80. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +2 -1
  81. data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +2 -1
  82. data/lib/oci/database/models/db_system.rb +2 -5
  83. data/lib/oci/database/models/db_system_summary.rb +2 -5
  84. data/lib/oci/database/models/launch_db_system_base.rb +3 -5
  85. data/lib/oci/database/models/maintenance_window.rb +2 -1
  86. data/lib/oci/database/models/update_autonomous_database_details.rb +5 -3
  87. data/lib/oci/database/models/update_db_system_details.rb +2 -5
  88. data/lib/oci/dns/dns.rb +2 -0
  89. data/lib/oci/dns/dns_client.rb +138 -1
  90. data/lib/oci/dns/models/change_steering_policy_compartment_details.rb +155 -0
  91. data/lib/oci/dns/models/change_zone_compartment_details.rb +155 -0
  92. data/lib/oci/events/events.rb +34 -0
  93. data/lib/oci/events/events_client.rb +537 -0
  94. data/lib/oci/events/events_client_composite_operations.rb +145 -0
  95. data/lib/oci/events/models/action.rb +275 -0
  96. data/lib/oci/events/models/action_details.rb +222 -0
  97. data/lib/oci/events/models/action_details_list.rb +150 -0
  98. data/lib/oci/events/models/action_list.rb +151 -0
  99. data/lib/oci/events/models/change_rule_compartment_details.rb +156 -0
  100. data/lib/oci/events/models/create_faa_s_action_details.rb +170 -0
  101. data/lib/oci/events/models/create_notification_service_action_details.rb +170 -0
  102. data/lib/oci/events/models/create_rule_details.rb +284 -0
  103. data/lib/oci/events/models/create_streaming_service_action_details.rb +170 -0
  104. data/lib/oci/events/models/faa_s_action.rb +178 -0
  105. data/lib/oci/events/models/notification_service_action.rb +179 -0
  106. data/lib/oci/events/models/rule.rb +372 -0
  107. data/lib/oci/events/models/rule_summary.rb +321 -0
  108. data/lib/oci/events/models/streaming_service_action.rb +178 -0
  109. data/lib/oci/events/models/update_rule_details.rb +266 -0
  110. data/lib/oci/events/util.rb +2 -0
  111. data/lib/oci/functions/functions.rb +29 -0
  112. data/lib/oci/functions/functions_invoke_client.rb +237 -0
  113. data/lib/oci/functions/functions_invoke_client_composite_operations.rb +24 -0
  114. data/lib/oci/functions/functions_management_client.rb +851 -0
  115. data/lib/oci/functions/functions_management_client_composite_operations.rb +266 -0
  116. data/lib/oci/functions/models/application.rb +322 -0
  117. data/lib/oci/functions/models/application_summary.rb +281 -0
  118. data/lib/oci/functions/models/change_application_compartment_details.rb +156 -0
  119. data/lib/oci/functions/models/create_application_details.rb +236 -0
  120. data/lib/oci/functions/models/create_function_details.rb +280 -0
  121. data/lib/oci/functions/models/function.rb +397 -0
  122. data/lib/oci/functions/models/function_summary.rb +381 -0
  123. data/lib/oci/functions/models/update_application_details.rb +191 -0
  124. data/lib/oci/functions/models/update_function_details.rb +250 -0
  125. data/lib/oci/functions/util.rb +2 -0
  126. data/lib/oci/healthchecks/health_checks_client.rb +147 -1
  127. data/lib/oci/healthchecks/healthchecks.rb +2 -0
  128. data/lib/oci/healthchecks/models/change_http_monitor_compartment_details.rb +155 -0
  129. data/lib/oci/healthchecks/models/change_ping_monitor_compartment_details.rb +155 -0
  130. data/lib/oci/healthchecks/models/create_http_monitor_details.rb +2 -1
  131. data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +2 -1
  132. data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +2 -1
  133. data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +2 -1
  134. data/lib/oci/healthchecks/models/http_monitor.rb +2 -0
  135. data/lib/oci/healthchecks/models/http_probe.rb +2 -0
  136. data/lib/oci/healthchecks/models/ping_monitor.rb +2 -0
  137. data/lib/oci/healthchecks/models/ping_probe.rb +2 -0
  138. data/lib/oci/healthchecks/models/update_http_monitor_details.rb +2 -0
  139. data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +2 -0
  140. data/lib/oci/identity/identity.rb +1 -0
  141. data/lib/oci/identity/identity_client.rb +70 -0
  142. data/lib/oci/identity/identity_client_composite_operations.rb +50 -0
  143. data/lib/oci/identity/models/move_compartment_details.rb +155 -0
  144. data/lib/oci/key_management/key_management.rb +2 -0
  145. data/lib/oci/key_management/kms_management_client.rb +73 -0
  146. data/lib/oci/key_management/kms_vault_client.rb +73 -0
  147. data/lib/oci/key_management/models/change_key_compartment_details.rb +153 -0
  148. data/lib/oci/key_management/models/change_vault_compartment_details.rb +153 -0
  149. data/lib/oci/key_management/models/key.rb +1 -0
  150. data/lib/oci/key_management/models/key_summary.rb +1 -0
  151. data/lib/oci/key_management/models/vault.rb +1 -0
  152. data/lib/oci/key_management/models/vault_summary.rb +1 -0
  153. data/lib/oci/limits/limits.rb +23 -0
  154. data/lib/oci/limits/models/create_quota_details.rb +220 -0
  155. data/lib/oci/limits/models/quota.rb +287 -0
  156. data/lib/oci/limits/models/quota_summary.rb +273 -0
  157. data/lib/oci/limits/models/update_quota_details.rb +194 -0
  158. data/lib/oci/limits/quotas_client.rb +439 -0
  159. data/lib/oci/limits/quotas_client_composite_operations.rb +143 -0
  160. data/lib/oci/limits/util.rb +2 -0
  161. data/lib/oci/load_balancer/load_balancer.rb +9 -0
  162. data/lib/oci/load_balancer/load_balancer_client.rb +139 -0
  163. data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
  164. data/lib/oci/load_balancer/models/allow_rule.rb +181 -0
  165. data/lib/oci/load_balancer/models/backend_set.rb +21 -4
  166. data/lib/oci/load_balancer/models/backend_set_details.rb +21 -4
  167. data/lib/oci/load_balancer/models/change_load_balancer_compartment_details.rb +156 -0
  168. data/lib/oci/load_balancer/models/control_access_using_http_methods_rule.rb +205 -0
  169. data/lib/oci/load_balancer/models/create_backend_set_details.rb +21 -4
  170. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +37 -1
  171. data/lib/oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.rb +334 -0
  172. data/lib/oci/load_balancer/models/listener_rule_summary.rb +166 -0
  173. data/lib/oci/load_balancer/models/rule.rb +4 -0
  174. data/lib/oci/load_balancer/models/rule_condition.rb +192 -0
  175. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +6 -0
  176. data/lib/oci/load_balancer/models/source_ip_address_condition.rb +167 -0
  177. data/lib/oci/load_balancer/models/source_vcn_id_condition.rb +169 -0
  178. data/lib/oci/load_balancer/models/source_vcn_ip_address_condition.rb +171 -0
  179. data/lib/oci/load_balancer/models/update_backend_set_details.rb +21 -4
  180. data/lib/oci/monitoring/models/alarm.rb +4 -3
  181. data/lib/oci/monitoring/models/alarm_summary.rb +4 -3
  182. data/lib/oci/monitoring/models/change_alarm_compartment_details.rb +155 -0
  183. data/lib/oci/monitoring/models/create_alarm_details.rb +4 -3
  184. data/lib/oci/monitoring/models/datapoint.rb +1 -1
  185. data/lib/oci/monitoring/models/list_metrics_details.rb +4 -4
  186. data/lib/oci/monitoring/models/metric_data.rb +14 -0
  187. data/lib/oci/monitoring/models/metric_data_details.rb +6 -4
  188. data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +3 -0
  189. data/lib/oci/monitoring/models/update_alarm_details.rb +4 -3
  190. data/lib/oci/monitoring/monitoring.rb +1 -0
  191. data/lib/oci/monitoring/monitoring_client.rb +140 -5
  192. data/lib/oci/ons/models/backoff_retry_policy.rb +2 -2
  193. data/lib/oci/ons/models/change_compartment_details.rb +156 -0
  194. data/lib/oci/ons/models/confirmation_result.rb +5 -6
  195. data/lib/oci/ons/models/create_topic_details.rb +1 -1
  196. data/lib/oci/ons/models/notification_topic.rb +2 -2
  197. data/lib/oci/ons/models/notification_topic_summary.rb +2 -2
  198. data/lib/oci/ons/models/subscription.rb +47 -4
  199. data/lib/oci/ons/models/subscription_summary.rb +19 -3
  200. data/lib/oci/ons/notification_control_plane_client.rb +95 -8
  201. data/lib/oci/ons/notification_data_plane_client.rb +109 -8
  202. data/lib/oci/ons/ons.rb +1 -0
  203. data/lib/oci/regions.rb +3 -0
  204. data/lib/oci/streaming/models/change_stream_compartment_details.rb +155 -0
  205. data/lib/oci/streaming/stream_admin_client.rb +58 -0
  206. data/lib/oci/streaming/streaming.rb +1 -0
  207. data/lib/oci/version.rb +1 -1
  208. data/lib/oci/waas/models/access_rule_criteria.rb +14 -2
  209. data/lib/oci/waas/models/change_certificate_compartment_details.rb +154 -0
  210. data/lib/oci/waas/models/change_waas_policy_compartment_details.rb +154 -0
  211. data/lib/oci/waas/models/create_certificate_details.rb +2 -2
  212. data/lib/oci/waas/models/protection_rule_exclusion.rb +16 -1
  213. data/lib/oci/waas/models/protection_settings.rb +9 -5
  214. data/lib/oci/waas/models/waas_policy.rb +1 -1
  215. data/lib/oci/waas/models/waf_config_details.rb +8 -8
  216. data/lib/oci/waas/models/waf_log.rb +40 -19
  217. data/lib/oci/waas/waas.rb +2 -0
  218. data/lib/oci/waas/waas_client.rb +155 -27
  219. data/lib/oci/work_requests/models/work_request.rb +14 -8
  220. data/lib/oci/work_requests/models/work_request_error.rb +3 -3
  221. data/lib/oci/work_requests/models/work_request_log_entry.rb +2 -2
  222. data/lib/oci/work_requests/models/work_request_resource.rb +9 -7
  223. data/lib/oci/work_requests/models/work_request_summary.rb +12 -6
  224. data/lib/oci/work_requests/work_request_client.rb +33 -16
  225. metadata +81 -2
@@ -15,6 +15,8 @@ module OCI
15
15
  ACTION_ADD_HTTP_RESPONSE_HEADER = 'ADD_HTTP_RESPONSE_HEADER'.freeze,
16
16
  ACTION_EXTEND_HTTP_RESPONSE_HEADER_VALUE = 'EXTEND_HTTP_RESPONSE_HEADER_VALUE'.freeze,
17
17
  ACTION_REMOVE_HTTP_RESPONSE_HEADER = 'REMOVE_HTTP_RESPONSE_HEADER'.freeze,
18
+ ACTION_ALLOW = 'ALLOW'.freeze,
19
+ ACTION_CONTROL_ACCESS_USING_HTTP_METHODS = 'CONTROL_ACCESS_USING_HTTP_METHODS'.freeze,
18
20
  ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
19
21
  ].freeze
20
22
 
@@ -52,6 +54,8 @@ module OCI
52
54
  return 'OCI::LoadBalancer::Models::RemoveHttpRequestHeaderRule' if type == 'REMOVE_HTTP_REQUEST_HEADER'
53
55
  return 'OCI::LoadBalancer::Models::ExtendHttpRequestHeaderValueRule' if type == 'EXTEND_HTTP_REQUEST_HEADER_VALUE'
54
56
  return 'OCI::LoadBalancer::Models::RemoveHttpResponseHeaderRule' if type == 'REMOVE_HTTP_RESPONSE_HEADER'
57
+ return 'OCI::LoadBalancer::Models::ControlAccessUsingHttpMethodsRule' if type == 'CONTROL_ACCESS_USING_HTTP_METHODS'
58
+ return 'OCI::LoadBalancer::Models::AllowRule' if type == 'ALLOW'
55
59
  return 'OCI::LoadBalancer::Models::AddHttpResponseHeaderRule' if type == 'ADD_HTTP_RESPONSE_HEADER'
56
60
  return 'OCI::LoadBalancer::Models::ExtendHttpResponseHeaderValueRule' if type == 'EXTEND_HTTP_RESPONSE_HEADER_VALUE'
57
61
 
@@ -0,0 +1,192 @@
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, Metrics/LineLength
7
+ module OCI
8
+ # A condition to apply to an access control rule.
9
+ # This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
10
+ class LoadBalancer::Models::RuleCondition
11
+ ATTRIBUTE_NAME_ENUM = [
12
+ ATTRIBUTE_NAME_SOURCE_IP_ADDRESS = 'SOURCE_IP_ADDRESS'.freeze,
13
+ ATTRIBUTE_NAME_SOURCE_VCN_ID = 'SOURCE_VCN_ID'.freeze,
14
+ ATTRIBUTE_NAME_SOURCE_VCN_IP_ADDRESS = 'SOURCE_VCN_IP_ADDRESS'.freeze,
15
+ ATTRIBUTE_NAME_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
16
+ ].freeze
17
+
18
+ # This attribute is required.
19
+ # @return [String]
20
+ attr_reader :attribute_name
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ # rubocop:disable Style/SymbolLiteral
26
+ 'attribute_name': :'attributeName'
27
+ # rubocop:enable Style/SymbolLiteral
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ # rubocop:disable Style/SymbolLiteral
35
+ 'attribute_name': :'String'
36
+ # rubocop:enable Style/SymbolLiteral
37
+ }
38
+ end
39
+
40
+ # rubocop:disable Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity, Metrics/AbcSize
41
+
42
+
43
+ # Given the hash representation of a subtype of this class,
44
+ # use the info in the hash to return the class of the subtype.
45
+ def self.get_subtype(object_hash)
46
+ type = object_hash[:'attributeName'] # rubocop:disable Style/SymbolLiteral
47
+
48
+ return 'OCI::LoadBalancer::Models::SourceVcnIdCondition' if type == 'SOURCE_VCN_ID'
49
+ return 'OCI::LoadBalancer::Models::SourceIpAddressCondition' if type == 'SOURCE_IP_ADDRESS'
50
+ return 'OCI::LoadBalancer::Models::SourceVcnIpAddressCondition' if type == 'SOURCE_VCN_IP_ADDRESS'
51
+
52
+ # TODO: Log a warning when the subtype is not found.
53
+ 'OCI::LoadBalancer::Models::RuleCondition'
54
+ end
55
+ # rubocop:enable Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity, Metrics/AbcSize
56
+
57
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
58
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
59
+
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ # @option attributes [String] :attribute_name The value to assign to the {#attribute_name} property
64
+ def initialize(attributes = {})
65
+ return unless attributes.is_a?(Hash)
66
+
67
+ # convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
69
+
70
+ self.attribute_name = attributes[:'attributeName'] if attributes[:'attributeName']
71
+
72
+ raise 'You cannot provide both :attributeName and :attribute_name' if attributes.key?(:'attributeName') && attributes.key?(:'attribute_name')
73
+
74
+ self.attribute_name = attributes[:'attribute_name'] if attributes[:'attribute_name']
75
+ end
76
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
77
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
78
+
79
+ # Custom attribute writer method checking allowed values (enum).
80
+ # @param [Object] attribute_name Object to be assigned
81
+ def attribute_name=(attribute_name)
82
+ # rubocop:disable Style/ConditionalAssignment
83
+ if attribute_name && !ATTRIBUTE_NAME_ENUM.include?(attribute_name)
84
+ OCI.logger.debug("Unknown value for 'attribute_name' [" + attribute_name + "]. Mapping to 'ATTRIBUTE_NAME_UNKNOWN_ENUM_VALUE'") if OCI.logger
85
+ @attribute_name = ATTRIBUTE_NAME_UNKNOWN_ENUM_VALUE
86
+ else
87
+ @attribute_name = attribute_name
88
+ end
89
+ # rubocop:enable Style/ConditionalAssignment
90
+ end
91
+
92
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
93
+
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] other the other object to be compared
97
+ def ==(other)
98
+ return true if equal?(other)
99
+
100
+ self.class == other.class &&
101
+ attribute_name == other.attribute_name
102
+ end
103
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
104
+
105
+ # @see the `==` method
106
+ # @param [Object] other the other object to be compared
107
+ def eql?(other)
108
+ self == other
109
+ end
110
+
111
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
112
+
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Fixnum] Hash code
116
+ def hash
117
+ [attribute_name].hash
118
+ end
119
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
120
+
121
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
122
+
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+
130
+ self.class.swagger_types.each_pair do |key, type|
131
+ if type =~ /^Array<(.*)>/i
132
+ # check to ensure the input is an array given that the the attribute
133
+ # is documented as an array but the input is not
134
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
135
+ public_method("#{key}=").call(
136
+ attributes[self.class.attribute_map[key]]
137
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
138
+ )
139
+ end
140
+ elsif !attributes[self.class.attribute_map[key]].nil?
141
+ public_method("#{key}=").call(
142
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
143
+ )
144
+ end
145
+ # or else data not found in attributes(hash), not an issue as the data can be optional
146
+ end
147
+
148
+ self
149
+ end
150
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
151
+
152
+ # Returns the string representation of the object
153
+ # @return [String] String presentation of the object
154
+ def to_s
155
+ to_hash.to_s
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = public_method(attr).call
164
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
165
+
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ private
172
+
173
+ # Outputs non-array value in the form of hash
174
+ # For object, use to_hash. Otherwise, just return the value
175
+ # @param [Object] value Any valid value
176
+ # @return [Hash] Returns the value in the form of hash
177
+ def _to_hash(value)
178
+ if value.is_a?(Array)
179
+ value.compact.map { |v| _to_hash(v) }
180
+ elsif value.is_a?(Hash)
181
+ {}.tap do |hash|
182
+ value.each { |k, v| hash[k] = _to_hash(v) }
183
+ end
184
+ elsif value.respond_to? :to_hash
185
+ value.to_hash
186
+ else
187
+ value
188
+ end
189
+ end
190
+ end
191
+ end
192
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -11,12 +11,18 @@ module OCI
11
11
  # logical client to a single backend web server. For more information, see
12
12
  # [Session Persistence](https://docs.cloud.oracle.com/Content/Balance/Reference/sessionpersistence.htm).
13
13
  #
14
+ # With application cookie stickiness, the load balancer enables session persistence only when the response from a backend
15
+ # application server includes a `Set-cookie` header with the user-specified cookie name.
16
+ #
14
17
  # To disable application cookie stickiness on a running load balancer, use the
15
18
  # {#update_backend_set update_backend_set} operation and specify `null` for the
16
19
  # `SessionPersistenceConfigurationDetails` object.
17
20
  #
18
21
  # Example: `SessionPersistenceConfigurationDetails: null`
19
22
  #
23
+ # **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails`
24
+ # (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
25
+ #
20
26
  # **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
21
27
  #
22
28
  class LoadBalancer::Models::SessionPersistenceConfigurationDetails
@@ -0,0 +1,167 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require_relative 'rule_condition'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
7
+ module OCI
8
+ # An access control rule condition that requires a match on the specified source IP address or address range.
9
+ #
10
+ class LoadBalancer::Models::SourceIpAddressCondition < LoadBalancer::Models::RuleCondition
11
+ # **[Required]** An IPv4 or IPv6 address range that the source IP address of an incoming packet must match.
12
+ #
13
+ # The service accepts only classless inter-domain routing (CIDR) format (x.x.x.x/y or x:x::x/y) strings.
14
+ #
15
+ # Specify 0.0.0.0/0 or ::/0 to match all incoming traffic.
16
+ #
17
+ # @return [String]
18
+ attr_accessor :attribute_value
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ # rubocop:disable Style/SymbolLiteral
24
+ 'attribute_name': :'attributeName',
25
+ 'attribute_value': :'attributeValue'
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
+ 'attribute_name': :'String',
35
+ 'attribute_value': :'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 [String] :attribute_value The value to assign to the {#attribute_value} property
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ attributes['attributeName'] = 'SOURCE_IP_ADDRESS'
51
+
52
+ super(attributes)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ self.attribute_value = attributes[:'attributeValue'] if attributes[:'attributeValue']
58
+
59
+ raise 'You cannot provide both :attributeValue and :attribute_value' if attributes.key?(:'attributeValue') && attributes.key?(:'attribute_value')
60
+
61
+ self.attribute_value = attributes[:'attribute_value'] if attributes[:'attribute_value']
62
+ end
63
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
64
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
65
+
66
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
67
+
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] other the other object to be compared
71
+ def ==(other)
72
+ return true if equal?(other)
73
+
74
+ self.class == other.class &&
75
+ attribute_name == other.attribute_name &&
76
+ attribute_value == other.attribute_value
77
+ end
78
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
79
+
80
+ # @see the `==` method
81
+ # @param [Object] other the other object to be compared
82
+ def eql?(other)
83
+ self == other
84
+ end
85
+
86
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
87
+
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Fixnum] Hash code
91
+ def hash
92
+ [attribute_name, attribute_value].hash
93
+ end
94
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
95
+
96
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
97
+
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /^Array<(.*)>/i
107
+ # check to ensure the input is an array given that the the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ public_method("#{key}=").call(
111
+ attributes[self.class.attribute_map[key]]
112
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
113
+ )
114
+ end
115
+ elsif !attributes[self.class.attribute_map[key]].nil?
116
+ public_method("#{key}=").call(
117
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
118
+ )
119
+ end
120
+ # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
126
+
127
+ # Returns the string representation of the object
128
+ # @return [String] String presentation of the object
129
+ def to_s
130
+ to_hash.to_s
131
+ end
132
+
133
+ # Returns the object in the form of hash
134
+ # @return [Hash] Returns the object in the form of hash
135
+ def to_hash
136
+ hash = {}
137
+ self.class.attribute_map.each_pair do |attr, param|
138
+ value = public_method(attr).call
139
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ private
147
+
148
+ # Outputs non-array value in the form of hash
149
+ # For object, use to_hash. Otherwise, just return the value
150
+ # @param [Object] value Any valid value
151
+ # @return [Hash] Returns the value in the form of hash
152
+ def _to_hash(value)
153
+ if value.is_a?(Array)
154
+ value.compact.map { |v| _to_hash(v) }
155
+ elsif value.is_a?(Hash)
156
+ {}.tap do |hash|
157
+ value.each { |k, v| hash[k] = _to_hash(v) }
158
+ end
159
+ elsif value.respond_to? :to_hash
160
+ value.to_hash
161
+ else
162
+ value
163
+ end
164
+ end
165
+ end
166
+ end
167
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,169 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require_relative 'rule_condition'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
7
+ module OCI
8
+ # An access control rule condition that requires a match on the specified source VCN OCID.
9
+ #
10
+ class LoadBalancer::Models::SourceVcnIdCondition < LoadBalancer::Models::RuleCondition
11
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the originating VCN that an incoming packet
12
+ # must match.
13
+ #
14
+ # You can use this condition in conjunction with `SourceVcnIpAddressCondition`.
15
+ #
16
+ # **NOTE:** If you define this condition for a rule without a `SourceVcnIpAddressCondition`, this condition
17
+ # matches all incoming traffic in the specified VCN.
18
+ #
19
+ # @return [String]
20
+ attr_accessor :attribute_value
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ # rubocop:disable Style/SymbolLiteral
26
+ 'attribute_name': :'attributeName',
27
+ 'attribute_value': :'attributeValue'
28
+ # rubocop:enable Style/SymbolLiteral
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ # rubocop:disable Style/SymbolLiteral
36
+ 'attribute_name': :'String',
37
+ 'attribute_value': :'String'
38
+ # rubocop:enable Style/SymbolLiteral
39
+ }
40
+ end
41
+
42
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
43
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
44
+
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ # @option attributes [String] :attribute_value The value to assign to the {#attribute_value} property
49
+ def initialize(attributes = {})
50
+ return unless attributes.is_a?(Hash)
51
+
52
+ attributes['attributeName'] = 'SOURCE_VCN_ID'
53
+
54
+ super(attributes)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
+
59
+ self.attribute_value = attributes[:'attributeValue'] if attributes[:'attributeValue']
60
+
61
+ raise 'You cannot provide both :attributeValue and :attribute_value' if attributes.key?(:'attributeValue') && attributes.key?(:'attribute_value')
62
+
63
+ self.attribute_value = attributes[:'attribute_value'] if attributes[:'attribute_value']
64
+ end
65
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
66
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
67
+
68
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
69
+
70
+
71
+ # Checks equality by comparing each attribute.
72
+ # @param [Object] other the other object to be compared
73
+ def ==(other)
74
+ return true if equal?(other)
75
+
76
+ self.class == other.class &&
77
+ attribute_name == other.attribute_name &&
78
+ attribute_value == other.attribute_value
79
+ end
80
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
81
+
82
+ # @see the `==` method
83
+ # @param [Object] other the other object to be compared
84
+ def eql?(other)
85
+ self == other
86
+ end
87
+
88
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
89
+
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Fixnum] Hash code
93
+ def hash
94
+ [attribute_name, attribute_value].hash
95
+ end
96
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
97
+
98
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
99
+
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+
107
+ self.class.swagger_types.each_pair do |key, type|
108
+ if type =~ /^Array<(.*)>/i
109
+ # check to ensure the input is an array given that the the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ public_method("#{key}=").call(
113
+ attributes[self.class.attribute_map[key]]
114
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
115
+ )
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ public_method("#{key}=").call(
119
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
120
+ )
121
+ end
122
+ # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
128
+
129
+ # Returns the string representation of the object
130
+ # @return [String] String presentation of the object
131
+ def to_s
132
+ to_hash.to_s
133
+ end
134
+
135
+ # Returns the object in the form of hash
136
+ # @return [Hash] Returns the object in the form of hash
137
+ def to_hash
138
+ hash = {}
139
+ self.class.attribute_map.each_pair do |attr, param|
140
+ value = public_method(attr).call
141
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
142
+
143
+ hash[param] = _to_hash(value)
144
+ end
145
+ hash
146
+ end
147
+
148
+ private
149
+
150
+ # Outputs non-array value in the form of hash
151
+ # For object, use to_hash. Otherwise, just return the value
152
+ # @param [Object] value Any valid value
153
+ # @return [Hash] Returns the value in the form of hash
154
+ def _to_hash(value)
155
+ if value.is_a?(Array)
156
+ value.compact.map { |v| _to_hash(v) }
157
+ elsif value.is_a?(Hash)
158
+ {}.tap do |hash|
159
+ value.each { |k, v| hash[k] = _to_hash(v) }
160
+ end
161
+ elsif value.respond_to? :to_hash
162
+ value.to_hash
163
+ else
164
+ value
165
+ end
166
+ end
167
+ end
168
+ end
169
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength