oci 2.5.11 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/auth/federation_client.rb +2 -1
  5. data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +6 -1
  6. data/lib/oci/auth/url_based_certificate_retriever.rb +6 -2
  7. data/lib/oci/auth/util.rb +18 -0
  8. data/lib/oci/core/compute_client.rb +730 -48
  9. data/lib/oci/core/compute_client_composite_operations.rb +119 -0
  10. data/lib/oci/core/compute_management_client.rb +11 -4
  11. data/lib/oci/core/core.rb +13 -0
  12. data/lib/oci/core/models/add_security_rule_details.rb +4 -2
  13. data/lib/oci/core/models/attach_vnic_details.rb +1 -0
  14. data/lib/oci/core/models/capture_console_history_details.rb +1 -0
  15. data/lib/oci/core/models/change_dedicated_vm_host_compartment_details.rb +155 -0
  16. data/lib/oci/core/models/change_dhcp_options_compartment_details.rb +155 -0
  17. data/lib/oci/core/models/change_internet_gateway_compartment_details.rb +155 -0
  18. data/lib/oci/core/models/change_local_peering_gateway_compartment_details.rb +155 -0
  19. data/lib/oci/core/models/change_network_security_group_compartment_details.rb +155 -0
  20. data/lib/oci/core/models/change_public_ip_compartment_details.rb +155 -0
  21. data/lib/oci/core/models/create_dedicated_vm_host_details.rb +262 -0
  22. data/lib/oci/core/models/create_drg_attachment_details.rb +4 -2
  23. data/lib/oci/core/models/create_image_details.rb +1 -1
  24. data/lib/oci/core/models/create_instance_configuration_base.rb +16 -6
  25. data/lib/oci/core/models/create_instance_configuration_details.rb +1 -1
  26. data/lib/oci/core/models/create_instance_configuration_from_instance_details.rb +3 -2
  27. data/lib/oci/core/models/create_instance_pool_details.rb +3 -1
  28. data/lib/oci/core/models/create_local_peering_gateway_details.rb +1 -1
  29. data/lib/oci/core/models/create_service_gateway_details.rb +1 -1
  30. data/lib/oci/core/models/create_volume_group_backup_details.rb +3 -1
  31. data/lib/oci/core/models/create_volume_group_details.rb +1 -1
  32. data/lib/oci/core/models/cross_connect_mapping.rb +4 -0
  33. data/lib/oci/core/models/dedicated_vm_host.rb +359 -0
  34. data/lib/oci/core/models/dedicated_vm_host_instance_shape_summary.rb +170 -0
  35. data/lib/oci/core/models/dedicated_vm_host_instance_summary.rb +215 -0
  36. data/lib/oci/core/models/dedicated_vm_host_shape_summary.rb +171 -0
  37. data/lib/oci/core/models/dedicated_vm_host_summary.rb +325 -0
  38. data/lib/oci/core/models/drg_attachment.rb +6 -3
  39. data/lib/oci/core/models/egress_security_rule.rb +1 -0
  40. data/lib/oci/core/models/image.rb +2 -0
  41. data/lib/oci/core/models/ingress_security_rule.rb +2 -1
  42. data/lib/oci/core/models/instance.rb +16 -1
  43. data/lib/oci/core/models/instance_configuration.rb +10 -7
  44. data/lib/oci/core/models/ipv6.rb +2 -0
  45. data/lib/oci/core/models/launch_instance_details.rb +16 -1
  46. data/lib/oci/core/models/launch_options.rb +3 -2
  47. data/lib/oci/core/models/local_peering_gateway.rb +4 -3
  48. data/lib/oci/core/models/route_rule.rb +2 -1
  49. data/lib/oci/core/models/security_rule.rb +3 -1
  50. data/lib/oci/core/models/service_gateway.rb +4 -3
  51. data/lib/oci/core/models/subnet.rb +2 -1
  52. data/lib/oci/core/models/update_console_history_details.rb +1 -0
  53. data/lib/oci/core/models/update_dedicated_vm_host_details.rb +194 -0
  54. data/lib/oci/core/models/update_drg_attachment_details.rb +6 -3
  55. data/lib/oci/core/models/update_instance_pool_details.rb +3 -1
  56. data/lib/oci/core/models/update_local_peering_gateway_details.rb +4 -3
  57. data/lib/oci/core/models/update_network_security_group_details.rb +2 -0
  58. data/lib/oci/core/models/update_security_rule_details.rb +4 -2
  59. data/lib/oci/core/models/update_service_gateway_details.rb +4 -3
  60. data/lib/oci/core/models/update_vnic_details.rb +2 -0
  61. data/lib/oci/core/models/update_volume_backup_details.rb +1 -1
  62. data/lib/oci/core/models/update_volume_group_backup_details.rb +2 -1
  63. data/lib/oci/core/models/update_volume_group_details.rb +2 -1
  64. data/lib/oci/core/models/vcn.rb +2 -1
  65. data/lib/oci/core/models/volume_backup_schedule.rb +1 -1
  66. data/lib/oci/core/virtual_network_client.rb +396 -59
  67. data/lib/oci/dts/dts.rb +57 -0
  68. data/lib/oci/dts/models/attach_devices_details.rb +153 -0
  69. data/lib/oci/dts/models/change_transfer_job_compartment_details.rb +154 -0
  70. data/lib/oci/dts/models/create_transfer_appliance_details.rb +152 -0
  71. data/lib/oci/dts/models/create_transfer_appliance_entitlement_details.rb +178 -0
  72. data/lib/oci/dts/models/create_transfer_device_details.rb +165 -0
  73. data/lib/oci/dts/models/create_transfer_job_details.rb +238 -0
  74. data/lib/oci/dts/models/create_transfer_package_details.rb +178 -0
  75. data/lib/oci/dts/models/detach_devices_details.rb +153 -0
  76. data/lib/oci/dts/models/multiple_transfer_appliances.rb +153 -0
  77. data/lib/oci/dts/models/multiple_transfer_devices.rb +153 -0
  78. data/lib/oci/dts/models/multiple_transfer_packages.rb +153 -0
  79. data/lib/oci/dts/models/new_transfer_device.rb +246 -0
  80. data/lib/oci/dts/models/shipping_address.rb +263 -0
  81. data/lib/oci/dts/models/shipping_vendors.rb +149 -0
  82. data/lib/oci/dts/models/transfer_appliance.rb +367 -0
  83. data/lib/oci/dts/models/transfer_appliance_certificate.rb +148 -0
  84. data/lib/oci/dts/models/transfer_appliance_encryption_passphrase.rb +152 -0
  85. data/lib/oci/dts/models/transfer_appliance_entitlement.rb +240 -0
  86. data/lib/oci/dts/models/transfer_appliance_public_key.rb +152 -0
  87. data/lib/oci/dts/models/transfer_appliance_summary.rb +223 -0
  88. data/lib/oci/dts/models/transfer_device.rb +268 -0
  89. data/lib/oci/dts/models/transfer_device_summary.rb +254 -0
  90. data/lib/oci/dts/models/transfer_job.rb +356 -0
  91. data/lib/oci/dts/models/transfer_job_summary.rb +296 -0
  92. data/lib/oci/dts/models/transfer_package.rb +281 -0
  93. data/lib/oci/dts/models/transfer_package_summary.rb +201 -0
  94. data/lib/oci/dts/models/update_transfer_appliance_details.rb +180 -0
  95. data/lib/oci/dts/models/update_transfer_device_details.rb +166 -0
  96. data/lib/oci/dts/models/update_transfer_job_details.rb +237 -0
  97. data/lib/oci/dts/models/update_transfer_package_details.rb +204 -0
  98. data/lib/oci/dts/shipping_vendors_client.rb +165 -0
  99. data/lib/oci/dts/shipping_vendors_client_composite_operations.rb +24 -0
  100. data/lib/oci/dts/transfer_appliance_client.rb +569 -0
  101. data/lib/oci/dts/transfer_appliance_client_composite_operations.rb +104 -0
  102. data/lib/oci/dts/transfer_appliance_entitlement_client.rb +223 -0
  103. data/lib/oci/dts/transfer_appliance_entitlement_client_composite_operations.rb +24 -0
  104. data/lib/oci/dts/transfer_device_client.rb +402 -0
  105. data/lib/oci/dts/transfer_device_client_composite_operations.rb +65 -0
  106. data/lib/oci/dts/transfer_job_client.rb +458 -0
  107. data/lib/oci/dts/transfer_job_client_composite_operations.rb +143 -0
  108. data/lib/oci/dts/transfer_package_client.rb +515 -0
  109. data/lib/oci/dts/transfer_package_client_composite_operations.rb +104 -0
  110. data/lib/oci/dts/util.rb +2 -0
  111. data/lib/oci/file_storage/models/create_file_system_details.rb +19 -4
  112. data/lib/oci/file_storage/models/file_system.rb +19 -4
  113. data/lib/oci/file_storage/models/file_system_summary.rb +19 -4
  114. data/lib/oci/file_storage/models/update_file_system_details.rb +22 -4
  115. data/lib/oci/limits/limits.rb +5 -0
  116. data/lib/oci/limits/limits_client.rb +444 -0
  117. data/lib/oci/limits/limits_client_composite_operations.rb +24 -0
  118. data/lib/oci/limits/models/create_quota_details.rb +1 -1
  119. data/lib/oci/limits/models/limit_definition_summary.rb +241 -0
  120. data/lib/oci/limits/models/limit_value_summary.rb +210 -0
  121. data/lib/oci/limits/models/quota.rb +1 -1
  122. data/lib/oci/limits/models/resource_availability.rb +163 -0
  123. data/lib/oci/limits/models/service_summary.rb +159 -0
  124. data/lib/oci/limits/models/update_quota_details.rb +1 -1
  125. data/lib/oci/limits/quotas_client.rb +12 -11
  126. data/lib/oci/monitoring/models/alarm.rb +20 -1
  127. data/lib/oci/monitoring/models/create_alarm_details.rb +20 -1
  128. data/lib/oci/monitoring/models/list_metrics_details.rb +23 -3
  129. data/lib/oci/monitoring/models/metric.rb +20 -1
  130. data/lib/oci/monitoring/models/metric_data.rb +20 -1
  131. data/lib/oci/monitoring/models/metric_data_details.rb +20 -1
  132. data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +20 -1
  133. data/lib/oci/monitoring/models/update_alarm_details.rb +20 -1
  134. data/lib/oci/regions.rb +14 -8
  135. data/lib/oci/streaming/models/archiver.rb +291 -0
  136. data/lib/oci/streaming/models/archiver_error.rb +159 -0
  137. data/lib/oci/streaming/models/archiver_lifecycle_state.rb +14 -0
  138. data/lib/oci/streaming/models/archiver_start_position.rb +10 -0
  139. data/lib/oci/streaming/models/create_archiver_details.rb +223 -0
  140. data/lib/oci/streaming/models/update_archiver_details.rb +222 -0
  141. data/lib/oci/streaming/stream_admin_client.rb +304 -0
  142. data/lib/oci/streaming/stream_admin_client_composite_operations.rb +162 -0
  143. data/lib/oci/streaming/streaming.rb +6 -0
  144. data/lib/oci/version.rb +1 -1
  145. data/lib/oci/waas/models/access_rule.rb +121 -4
  146. data/lib/oci/waas/models/access_rule_criteria.rb +12 -0
  147. data/lib/oci/waas/models/address_list.rb +289 -0
  148. data/lib/oci/waas/models/address_list_summary.rb +279 -0
  149. data/lib/oci/waas/models/caching_rule.rb +243 -0
  150. data/lib/oci/waas/models/caching_rule_criteria.rb +194 -0
  151. data/lib/oci/waas/models/caching_rule_summary.rb +246 -0
  152. data/lib/oci/waas/models/certificate.rb +22 -9
  153. data/lib/oci/waas/models/certificate_extensions.rb +3 -0
  154. data/lib/oci/waas/models/certificate_issuer_name.rb +225 -0
  155. data/lib/oci/waas/models/certificate_public_key_info.rb +4 -1
  156. data/lib/oci/waas/models/certificate_subject_name.rb +8 -1
  157. data/lib/oci/waas/models/certificate_summary.rb +10 -2
  158. data/lib/oci/waas/models/change_address_list_compartment_details.rb +154 -0
  159. data/lib/oci/waas/models/change_custom_protection_rule_compartment_details.rb +154 -0
  160. data/lib/oci/waas/models/create_address_list_details.rb +213 -0
  161. data/lib/oci/waas/models/create_certificate_details.rb +22 -3
  162. data/lib/oci/waas/models/create_custom_protection_rule_details.rb +251 -0
  163. data/lib/oci/waas/models/create_waas_policy_details.rb +26 -4
  164. data/lib/oci/waas/models/custom_protection_rule.rb +326 -0
  165. data/lib/oci/waas/models/custom_protection_rule_setting.rb +180 -0
  166. data/lib/oci/waas/models/custom_protection_rule_summary.rb +279 -0
  167. data/lib/oci/waas/models/origin_group.rb +149 -0
  168. data/lib/oci/waas/models/origin_group_origins.rb +159 -0
  169. data/lib/oci/waas/models/policy_config.rb +201 -4
  170. data/lib/oci/waas/models/protection_rule_exclusion.rb +2 -2
  171. data/lib/oci/waas/models/purge_cache.rb +149 -0
  172. data/lib/oci/waas/models/update_address_list_details.rb +199 -0
  173. data/lib/oci/waas/models/update_certificate_details.rb +10 -2
  174. data/lib/oci/waas/models/update_custom_protection_rule_details.rb +237 -0
  175. data/lib/oci/waas/models/update_waas_policy_details.rb +26 -4
  176. data/lib/oci/waas/models/waas_policy.rb +25 -3
  177. data/lib/oci/waas/models/waas_policy_custom_protection_rule_summary.rb +207 -0
  178. data/lib/oci/waas/models/waas_policy_summary.rb +10 -2
  179. data/lib/oci/waas/models/waf_config.rb +43 -1
  180. data/lib/oci/waas/models/waf_config_details.rb +43 -1
  181. data/lib/oci/waas/models/waf_log.rb +3 -3
  182. data/lib/oci/waas/models/work_request.rb +4 -1
  183. data/lib/oci/waas/models/work_request_operation_types.rb +4 -1
  184. data/lib/oci/waas/models/work_request_summary.rb +4 -1
  185. data/lib/oci/waas/waas.rb +19 -0
  186. data/lib/oci/waas/waas_client.rb +1147 -61
  187. data/lib/oci/waas/waas_client_composite_operations.rb +386 -0
  188. metadata +90 -2
@@ -10,7 +10,12 @@ module OCI
10
10
  end
11
11
 
12
12
  # Require models
13
+ require 'oci/streaming/models/archiver'
14
+ require 'oci/streaming/models/archiver_error'
15
+ require 'oci/streaming/models/archiver_lifecycle_state'
16
+ require 'oci/streaming/models/archiver_start_position'
13
17
  require 'oci/streaming/models/change_stream_compartment_details'
18
+ require 'oci/streaming/models/create_archiver_details'
14
19
  require 'oci/streaming/models/create_cursor_details'
15
20
  require 'oci/streaming/models/create_group_cursor_details'
16
21
  require 'oci/streaming/models/create_stream_details'
@@ -24,6 +29,7 @@ require 'oci/streaming/models/put_messages_result'
24
29
  require 'oci/streaming/models/put_messages_result_entry'
25
30
  require 'oci/streaming/models/stream'
26
31
  require 'oci/streaming/models/stream_summary'
32
+ require 'oci/streaming/models/update_archiver_details'
27
33
  require 'oci/streaming/models/update_group_details'
28
34
  require 'oci/streaming/models/update_stream_details'
29
35
 
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  module OCI
4
- VERSION = '2.5.11'.freeze
4
+ VERSION = '2.6.0'.freeze
5
5
  end
@@ -11,6 +11,8 @@ module OCI
11
11
  ACTION_ALLOW = 'ALLOW'.freeze,
12
12
  ACTION_DETECT = 'DETECT'.freeze,
13
13
  ACTION_BLOCK = 'BLOCK'.freeze,
14
+ ACTION_BYPASS = 'BYPASS'.freeze,
15
+ ACTION_REDIRECT = 'REDIRECT'.freeze,
14
16
  ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
15
17
  ].freeze
16
18
 
@@ -20,6 +22,20 @@ module OCI
20
22
  BLOCK_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
21
23
  ].freeze
22
24
 
25
+ BYPASS_CHALLENGES_ENUM = [
26
+ BYPASS_CHALLENGES_JS_CHALLENGE = 'JS_CHALLENGE'.freeze,
27
+ BYPASS_CHALLENGES_DEVICE_FINGERPRINT_CHALLENGE = 'DEVICE_FINGERPRINT_CHALLENGE'.freeze,
28
+ BYPASS_CHALLENGES_HUMAN_INTERACTION_CHALLENGE = 'HUMAN_INTERACTION_CHALLENGE'.freeze,
29
+ BYPASS_CHALLENGES_CAPTCHA = 'CAPTCHA'.freeze,
30
+ BYPASS_CHALLENGES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
31
+ ].freeze
32
+
33
+ REDIRECT_RESPONSE_CODE_ENUM = [
34
+ REDIRECT_RESPONSE_CODE_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'.freeze,
35
+ REDIRECT_RESPONSE_CODE_FOUND = 'FOUND'.freeze,
36
+ REDIRECT_RESPONSE_CODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
37
+ ].freeze
38
+
23
39
  # **[Required]** The unique name of the access rule.
24
40
  # @return [String]
25
41
  attr_accessor :name
@@ -29,6 +45,18 @@ module OCI
29
45
  attr_accessor :criteria
30
46
 
31
47
  # **[Required]** The action to take when the access criteria are met for a rule. If unspecified, defaults to `ALLOW`.
48
+ #
49
+ # - **ALLOW:** Takes no action, just logs the request.
50
+ #
51
+ # - **DETECT:** Takes no action, but creates an alert for the request.
52
+ #
53
+ # - **BLOCK:** Blocks the request by returning specified response code or showing error page.
54
+ #
55
+ # - **BYPASS:** Bypasses some or all challenges.
56
+ #
57
+ # - **REDIRECT:** Redirects the request to the specified URL.
58
+ #
59
+ # Regardless of action, no further rules are processed once the rule is matched.
32
60
  # @return [String]
33
61
  attr_reader :action
34
62
 
@@ -52,6 +80,30 @@ module OCI
52
80
  # @return [String]
53
81
  attr_accessor :block_error_page_description
54
82
 
83
+ # The list of challenges to bypass when `action` is set to `BYPASS`. If unspecified or empty, all challenges are bypassed.
84
+ #
85
+ # - **JS_CHALLENGE:** Bypasses JavaScript Challenge.
86
+ #
87
+ # - **DEVICE_FINGERPRINT_CHALLENGE:** Bypasses Device Fingerprint Challenge.
88
+ #
89
+ # - **HUMAN_INTERACTION_CHALLENGE:** Bypasses Human Interaction Challenge.
90
+ #
91
+ # - **CAPTCHA:** Bypasses CAPTCHA Challenge.
92
+ # @return [Array<String>]
93
+ attr_reader :bypass_challenges
94
+
95
+ # The target to which the request should be redirected, represented as a URI reference.
96
+ # @return [String]
97
+ attr_accessor :redirect_url
98
+
99
+ # The response status code to return when `action` is set to `REDIRECT`.
100
+ #
101
+ # - **MOVED_PERMANENTLY:** Used for designating the permanent movement of a page (numerical code - 301).
102
+ #
103
+ # - **FOUND:** Used for designating the temporary movement of a page (numerical code - 302).
104
+ # @return [String]
105
+ attr_reader :redirect_response_code
106
+
55
107
  # Attribute mapping from ruby-style variable name to JSON key.
56
108
  def self.attribute_map
57
109
  {
@@ -63,7 +115,10 @@ module OCI
63
115
  'block_response_code': :'blockResponseCode',
64
116
  'block_error_page_message': :'blockErrorPageMessage',
65
117
  'block_error_page_code': :'blockErrorPageCode',
66
- 'block_error_page_description': :'blockErrorPageDescription'
118
+ 'block_error_page_description': :'blockErrorPageDescription',
119
+ 'bypass_challenges': :'bypassChallenges',
120
+ 'redirect_url': :'redirectUrl',
121
+ 'redirect_response_code': :'redirectResponseCode'
67
122
  # rubocop:enable Style/SymbolLiteral
68
123
  }
69
124
  end
@@ -79,7 +134,10 @@ module OCI
79
134
  'block_response_code': :'Integer',
80
135
  'block_error_page_message': :'String',
81
136
  'block_error_page_code': :'String',
82
- 'block_error_page_description': :'String'
137
+ 'block_error_page_description': :'String',
138
+ 'bypass_challenges': :'Array<String>',
139
+ 'redirect_url': :'String',
140
+ 'redirect_response_code': :'String'
83
141
  # rubocop:enable Style/SymbolLiteral
84
142
  }
85
143
  end
@@ -98,6 +156,9 @@ module OCI
98
156
  # @option attributes [String] :block_error_page_message The value to assign to the {#block_error_page_message} property
99
157
  # @option attributes [String] :block_error_page_code The value to assign to the {#block_error_page_code} property
100
158
  # @option attributes [String] :block_error_page_description The value to assign to the {#block_error_page_description} property
159
+ # @option attributes [Array<String>] :bypass_challenges The value to assign to the {#bypass_challenges} property
160
+ # @option attributes [String] :redirect_url The value to assign to the {#redirect_url} property
161
+ # @option attributes [String] :redirect_response_code The value to assign to the {#redirect_response_code} property
101
162
  def initialize(attributes = {})
102
163
  return unless attributes.is_a?(Hash)
103
164
 
@@ -139,6 +200,26 @@ module OCI
139
200
  raise 'You cannot provide both :blockErrorPageDescription and :block_error_page_description' if attributes.key?(:'blockErrorPageDescription') && attributes.key?(:'block_error_page_description')
140
201
 
141
202
  self.block_error_page_description = attributes[:'block_error_page_description'] if attributes[:'block_error_page_description']
203
+
204
+ self.bypass_challenges = attributes[:'bypassChallenges'] if attributes[:'bypassChallenges']
205
+
206
+ raise 'You cannot provide both :bypassChallenges and :bypass_challenges' if attributes.key?(:'bypassChallenges') && attributes.key?(:'bypass_challenges')
207
+
208
+ self.bypass_challenges = attributes[:'bypass_challenges'] if attributes[:'bypass_challenges']
209
+
210
+ self.redirect_url = attributes[:'redirectUrl'] if attributes[:'redirectUrl']
211
+
212
+ raise 'You cannot provide both :redirectUrl and :redirect_url' if attributes.key?(:'redirectUrl') && attributes.key?(:'redirect_url')
213
+
214
+ self.redirect_url = attributes[:'redirect_url'] if attributes[:'redirect_url']
215
+
216
+ self.redirect_response_code = attributes[:'redirectResponseCode'] if attributes[:'redirectResponseCode']
217
+ self.redirect_response_code = "MOVED_PERMANENTLY" if redirect_response_code.nil? && !attributes.key?(:'redirectResponseCode') # rubocop:disable Style/StringLiterals
218
+
219
+ raise 'You cannot provide both :redirectResponseCode and :redirect_response_code' if attributes.key?(:'redirectResponseCode') && attributes.key?(:'redirect_response_code')
220
+
221
+ self.redirect_response_code = attributes[:'redirect_response_code'] if attributes[:'redirect_response_code']
222
+ self.redirect_response_code = "MOVED_PERMANENTLY" if redirect_response_code.nil? && !attributes.key?(:'redirectResponseCode') && !attributes.key?(:'redirect_response_code') # rubocop:disable Style/StringLiterals
142
223
  end
143
224
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
144
225
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -169,6 +250,39 @@ module OCI
169
250
  # rubocop:enable Style/ConditionalAssignment
170
251
  end
171
252
 
253
+ # Custom attribute writer method checking allowed values (enum).
254
+ # @param [Object] bypass_challenges Object to be assigned
255
+ def bypass_challenges=(bypass_challenges)
256
+ # rubocop:disable Style/ConditionalAssignment
257
+ if bypass_challenges.nil?
258
+ @bypass_challenges = nil
259
+ else
260
+ @bypass_challenges =
261
+ bypass_challenges.collect do |item|
262
+ if BYPASS_CHALLENGES_ENUM.include?(item)
263
+ item
264
+ else
265
+ OCI.logger.debug("Unknown value for 'bypass_challenges' [#{item}]. Mapping to 'BYPASS_CHALLENGES_UNKNOWN_ENUM_VALUE'") if OCI.logger
266
+ BYPASS_CHALLENGES_UNKNOWN_ENUM_VALUE
267
+ end
268
+ end
269
+ end
270
+ # rubocop:enable Style/ConditionalAssignment
271
+ end
272
+
273
+ # Custom attribute writer method checking allowed values (enum).
274
+ # @param [Object] redirect_response_code Object to be assigned
275
+ def redirect_response_code=(redirect_response_code)
276
+ # rubocop:disable Style/ConditionalAssignment
277
+ if redirect_response_code && !REDIRECT_RESPONSE_CODE_ENUM.include?(redirect_response_code)
278
+ OCI.logger.debug("Unknown value for 'redirect_response_code' [" + redirect_response_code + "]. Mapping to 'REDIRECT_RESPONSE_CODE_UNKNOWN_ENUM_VALUE'") if OCI.logger
279
+ @redirect_response_code = REDIRECT_RESPONSE_CODE_UNKNOWN_ENUM_VALUE
280
+ else
281
+ @redirect_response_code = redirect_response_code
282
+ end
283
+ # rubocop:enable Style/ConditionalAssignment
284
+ end
285
+
172
286
  # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
173
287
 
174
288
 
@@ -185,7 +299,10 @@ module OCI
185
299
  block_response_code == other.block_response_code &&
186
300
  block_error_page_message == other.block_error_page_message &&
187
301
  block_error_page_code == other.block_error_page_code &&
188
- block_error_page_description == other.block_error_page_description
302
+ block_error_page_description == other.block_error_page_description &&
303
+ bypass_challenges == other.bypass_challenges &&
304
+ redirect_url == other.redirect_url &&
305
+ redirect_response_code == other.redirect_response_code
189
306
  end
190
307
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
191
308
 
@@ -201,7 +318,7 @@ module OCI
201
318
  # Calculates hash code according to all attributes.
202
319
  # @return [Fixnum] Hash code
203
320
  def hash
204
- [name, criteria, action, block_action, block_response_code, block_error_page_message, block_error_page_code, block_error_page_description].hash
321
+ [name, criteria, action, block_action, block_response_code, block_error_page_message, block_error_page_code, block_error_page_description, bypass_challenges, redirect_url, redirect_response_code].hash
205
322
  end
206
323
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
207
324
 
@@ -17,6 +17,10 @@ module OCI
17
17
  CONDITION_IP_IS = 'IP_IS'.freeze,
18
18
  CONDITION_IP_IS_NOT = 'IP_IS_NOT'.freeze,
19
19
  CONDITION_HTTP_HEADER_CONTAINS = 'HTTP_HEADER_CONTAINS'.freeze,
20
+ CONDITION_IP_IN_LIST = 'IP_IN_LIST'.freeze,
21
+ CONDITION_IP_NOT_IN_LIST = 'IP_NOT_IN_LIST'.freeze,
22
+ CONDITION_HTTP_METHOD_IS = 'HTTP_METHOD_IS'.freeze,
23
+ CONDITION_HTTP_METHOD_IS_NOT = 'HTTP_METHOD_IS_NOT'.freeze,
20
24
  CONDITION_COUNTRY_IS = 'COUNTRY_IS'.freeze,
21
25
  CONDITION_COUNTRY_IS_NOT = 'COUNTRY_IS_NOT'.freeze,
22
26
  CONDITION_USER_AGENT_IS = 'USER_AGENT_IS'.freeze,
@@ -44,6 +48,14 @@ module OCI
44
48
  # - **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match.
45
49
  # *Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match.
46
50
  #
51
+ # - **IP_IN_LIST:** Matches if the request originates from one of IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list.
52
+ #
53
+ # - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list.
54
+ #
55
+ # - **HTTP_METHOD_IS:** Matches if the request method corresponds to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
56
+ #
57
+ # - **HTTP_METHOD_IS_NOT:** Matches if the request method does not correspond to the `value` field. The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
58
+ #
47
59
  # - **COUNTRY_IS:** Matches if the request originates from a country in the `value` field. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see [ISO's website](https://www.iso.org/obp/ui/#search/code/).
48
60
  #
49
61
  # - **COUNTRY_IS_NOT:** Matches if the request does not originate from a country in the `value` field. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see [ISO's website](https://www.iso.org/obp/ui/#search/code/).
@@ -0,0 +1,289 @@
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
+ # The details of the address list.
9
+ class Waas::Models::AddressList
10
+ LIFECYCLE_STATE_ENUM = [
11
+ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
12
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
13
+ LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
14
+ LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
15
+ LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
16
+ LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
17
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
18
+ ].freeze
19
+
20
+ # The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list.
21
+ # @return [String]
22
+ attr_accessor :id
23
+
24
+ # The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the address list's compartment.
25
+ # @return [String]
26
+ attr_accessor :compartment_id
27
+
28
+ # The user-friendly name of the address list.
29
+ # @return [String]
30
+ attr_accessor :display_name
31
+
32
+ # The total number of unique IP addresses in the address list.
33
+ # @return [Float]
34
+ attr_accessor :address_count
35
+
36
+ # The list of IP addresses or CIDR notations.
37
+ # @return [Array<String>]
38
+ attr_accessor :addresses
39
+
40
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
41
+ # For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
42
+ #
43
+ # Example: `{\"Department\": \"Finance\"}`
44
+ #
45
+ # @return [Hash<String, String>]
46
+ attr_accessor :freeform_tags
47
+
48
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
49
+ # For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
50
+ #
51
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
52
+ #
53
+ # @return [Hash<String, Hash<String, Object>>]
54
+ attr_accessor :defined_tags
55
+
56
+ # The current lifecycle state of the address list.
57
+ # @return [String]
58
+ attr_reader :lifecycle_state
59
+
60
+ # The date and time the address list was created, expressed in RFC 3339 timestamp format.
61
+ # @return [DateTime]
62
+ attr_accessor :time_created
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ # rubocop:disable Style/SymbolLiteral
68
+ 'id': :'id',
69
+ 'compartment_id': :'compartmentId',
70
+ 'display_name': :'displayName',
71
+ 'address_count': :'addressCount',
72
+ 'addresses': :'addresses',
73
+ 'freeform_tags': :'freeformTags',
74
+ 'defined_tags': :'definedTags',
75
+ 'lifecycle_state': :'lifecycleState',
76
+ 'time_created': :'timeCreated'
77
+ # rubocop:enable Style/SymbolLiteral
78
+ }
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.swagger_types
83
+ {
84
+ # rubocop:disable Style/SymbolLiteral
85
+ 'id': :'String',
86
+ 'compartment_id': :'String',
87
+ 'display_name': :'String',
88
+ 'address_count': :'Float',
89
+ 'addresses': :'Array<String>',
90
+ 'freeform_tags': :'Hash<String, String>',
91
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
92
+ 'lifecycle_state': :'String',
93
+ 'time_created': :'DateTime'
94
+ # rubocop:enable Style/SymbolLiteral
95
+ }
96
+ end
97
+
98
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
99
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
100
+
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @option attributes [String] :id The value to assign to the {#id} property
105
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
106
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
107
+ # @option attributes [Float] :address_count The value to assign to the {#address_count} property
108
+ # @option attributes [Array<String>] :addresses The value to assign to the {#addresses} property
109
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
110
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
111
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
112
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
113
+ def initialize(attributes = {})
114
+ return unless attributes.is_a?(Hash)
115
+
116
+ # convert string to symbol for hash key
117
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
118
+
119
+ self.id = attributes[:'id'] if attributes[:'id']
120
+
121
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
122
+
123
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
124
+
125
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
126
+
127
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
128
+
129
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
130
+
131
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
132
+
133
+ self.address_count = attributes[:'addressCount'] if attributes[:'addressCount']
134
+
135
+ raise 'You cannot provide both :addressCount and :address_count' if attributes.key?(:'addressCount') && attributes.key?(:'address_count')
136
+
137
+ self.address_count = attributes[:'address_count'] if attributes[:'address_count']
138
+
139
+ self.addresses = attributes[:'addresses'] if attributes[:'addresses']
140
+
141
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
142
+
143
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
144
+
145
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
146
+
147
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
148
+
149
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
150
+
151
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
152
+
153
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
154
+
155
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
156
+
157
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
158
+
159
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
160
+
161
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
162
+
163
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
164
+ end
165
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
166
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
167
+
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] lifecycle_state Object to be assigned
170
+ def lifecycle_state=(lifecycle_state)
171
+ # rubocop:disable Style/ConditionalAssignment
172
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
173
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
174
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
175
+ else
176
+ @lifecycle_state = lifecycle_state
177
+ end
178
+ # rubocop:enable Style/ConditionalAssignment
179
+ end
180
+
181
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
182
+
183
+
184
+ # Checks equality by comparing each attribute.
185
+ # @param [Object] other the other object to be compared
186
+ def ==(other)
187
+ return true if equal?(other)
188
+
189
+ self.class == other.class &&
190
+ id == other.id &&
191
+ compartment_id == other.compartment_id &&
192
+ display_name == other.display_name &&
193
+ address_count == other.address_count &&
194
+ addresses == other.addresses &&
195
+ freeform_tags == other.freeform_tags &&
196
+ defined_tags == other.defined_tags &&
197
+ lifecycle_state == other.lifecycle_state &&
198
+ time_created == other.time_created
199
+ end
200
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
201
+
202
+ # @see the `==` method
203
+ # @param [Object] other the other object to be compared
204
+ def eql?(other)
205
+ self == other
206
+ end
207
+
208
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
209
+
210
+
211
+ # Calculates hash code according to all attributes.
212
+ # @return [Fixnum] Hash code
213
+ def hash
214
+ [id, compartment_id, display_name, address_count, addresses, freeform_tags, defined_tags, lifecycle_state, time_created].hash
215
+ end
216
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
217
+
218
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
219
+
220
+
221
+ # Builds the object from hash
222
+ # @param [Hash] attributes Model attributes in the form of hash
223
+ # @return [Object] Returns the model itself
224
+ def build_from_hash(attributes)
225
+ return nil unless attributes.is_a?(Hash)
226
+
227
+ self.class.swagger_types.each_pair do |key, type|
228
+ if type =~ /^Array<(.*)>/i
229
+ # check to ensure the input is an array given that the the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
232
+ public_method("#{key}=").call(
233
+ attributes[self.class.attribute_map[key]]
234
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
235
+ )
236
+ end
237
+ elsif !attributes[self.class.attribute_map[key]].nil?
238
+ public_method("#{key}=").call(
239
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
240
+ )
241
+ end
242
+ # or else data not found in attributes(hash), not an issue as the data can be optional
243
+ end
244
+
245
+ self
246
+ end
247
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = public_method(attr).call
261
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
262
+
263
+ hash[param] = _to_hash(value)
264
+ end
265
+ hash
266
+ end
267
+
268
+ private
269
+
270
+ # Outputs non-array value in the form of hash
271
+ # For object, use to_hash. Otherwise, just return the value
272
+ # @param [Object] value Any valid value
273
+ # @return [Hash] Returns the value in the form of hash
274
+ def _to_hash(value)
275
+ if value.is_a?(Array)
276
+ value.compact.map { |v| _to_hash(v) }
277
+ elsif value.is_a?(Hash)
278
+ {}.tap do |hash|
279
+ value.each { |k, v| hash[k] = _to_hash(v) }
280
+ end
281
+ elsif value.respond_to? :to_hash
282
+ value.to_hash
283
+ else
284
+ value
285
+ end
286
+ end
287
+ end
288
+ end
289
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength