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
@@ -44,12 +44,28 @@ module OCI
44
44
  # @return [String]
45
45
  attr_accessor :cross_connect_group_id
46
46
 
47
+ # Defined tags for this resource. Each key is predefined and scoped to a
48
+ # namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
49
+ #
50
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
51
+ #
52
+ # @return [Hash<String, Hash<String, Object>>]
53
+ attr_accessor :defined_tags
54
+
47
55
  # A user-friendly name. Does not have to be unique, and it's changeable.
48
56
  # Avoid entering confidential information.
49
57
  #
50
58
  # @return [String]
51
59
  attr_accessor :display_name
52
60
 
61
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
62
+ # predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
63
+ #
64
+ # Example: `{\"Department\": \"Finance\"}`
65
+ #
66
+ # @return [Hash<String, String>]
67
+ attr_accessor :freeform_tags
68
+
53
69
  # The cross-connect's Oracle ID (OCID).
54
70
  # @return [String]
55
71
  attr_accessor :id
@@ -92,7 +108,9 @@ module OCI
92
108
  # rubocop:disable Style/SymbolLiteral
93
109
  'compartment_id': :'compartmentId',
94
110
  'cross_connect_group_id': :'crossConnectGroupId',
111
+ 'defined_tags': :'definedTags',
95
112
  'display_name': :'displayName',
113
+ 'freeform_tags': :'freeformTags',
96
114
  'id': :'id',
97
115
  'lifecycle_state': :'lifecycleState',
98
116
  'location_name': :'locationName',
@@ -110,7 +128,9 @@ module OCI
110
128
  # rubocop:disable Style/SymbolLiteral
111
129
  'compartment_id': :'String',
112
130
  'cross_connect_group_id': :'String',
131
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
113
132
  'display_name': :'String',
133
+ 'freeform_tags': :'Hash<String, String>',
114
134
  'id': :'String',
115
135
  'lifecycle_state': :'String',
116
136
  'location_name': :'String',
@@ -130,7 +150,9 @@ module OCI
130
150
  # @param [Hash] attributes Model attributes in the form of hash
131
151
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
132
152
  # @option attributes [String] :cross_connect_group_id The value to assign to the {#cross_connect_group_id} property
153
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
133
154
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
155
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
134
156
  # @option attributes [String] :id The value to assign to the {#id} property
135
157
  # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
136
158
  # @option attributes [String] :location_name The value to assign to the {#location_name} property
@@ -156,12 +178,24 @@ module OCI
156
178
 
157
179
  self.cross_connect_group_id = attributes[:'cross_connect_group_id'] if attributes[:'cross_connect_group_id']
158
180
 
181
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
182
+
183
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
184
+
185
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
186
+
159
187
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
160
188
 
161
189
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
162
190
 
163
191
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
164
192
 
193
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
194
+
195
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
196
+
197
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
198
+
165
199
  self.id = attributes[:'id'] if attributes[:'id']
166
200
 
167
201
  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
@@ -227,7 +261,9 @@ module OCI
227
261
  self.class == other.class &&
228
262
  compartment_id == other.compartment_id &&
229
263
  cross_connect_group_id == other.cross_connect_group_id &&
264
+ defined_tags == other.defined_tags &&
230
265
  display_name == other.display_name &&
266
+ freeform_tags == other.freeform_tags &&
231
267
  id == other.id &&
232
268
  lifecycle_state == other.lifecycle_state &&
233
269
  location_name == other.location_name &&
@@ -250,7 +286,7 @@ module OCI
250
286
  # Calculates hash code according to all attributes.
251
287
  # @return [Fixnum] Hash code
252
288
  def hash
253
- [compartment_id, cross_connect_group_id, display_name, id, lifecycle_state, location_name, port_name, port_speed_shape_name, customer_reference_name, time_created].hash
289
+ [compartment_id, cross_connect_group_id, defined_tags, display_name, freeform_tags, id, lifecycle_state, location_name, port_name, port_speed_shape_name, customer_reference_name, time_created].hash
254
290
  end
255
291
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
256
292
 
@@ -36,12 +36,28 @@ module OCI
36
36
  # @return [String]
37
37
  attr_accessor :compartment_id
38
38
 
39
+ # Defined tags for this resource. Each key is predefined and scoped to a
40
+ # namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
41
+ #
42
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
43
+ #
44
+ # @return [Hash<String, Hash<String, Object>>]
45
+ attr_accessor :defined_tags
46
+
39
47
  # The display name of a user-friendly name. Does not have to be unique, and it's changeable.
40
48
  # Avoid entering confidential information.
41
49
  #
42
50
  # @return [String]
43
51
  attr_accessor :display_name
44
52
 
53
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
54
+ # predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
55
+ #
56
+ # Example: `{\"Department\": \"Finance\"}`
57
+ #
58
+ # @return [Hash<String, String>]
59
+ attr_accessor :freeform_tags
60
+
45
61
  # The cross-connect group's Oracle ID (OCID).
46
62
  # @return [String]
47
63
  attr_accessor :id
@@ -68,7 +84,9 @@ module OCI
68
84
  {
69
85
  # rubocop:disable Style/SymbolLiteral
70
86
  'compartment_id': :'compartmentId',
87
+ 'defined_tags': :'definedTags',
71
88
  'display_name': :'displayName',
89
+ 'freeform_tags': :'freeformTags',
72
90
  'id': :'id',
73
91
  'lifecycle_state': :'lifecycleState',
74
92
  'customer_reference_name': :'customerReferenceName',
@@ -82,7 +100,9 @@ module OCI
82
100
  {
83
101
  # rubocop:disable Style/SymbolLiteral
84
102
  'compartment_id': :'String',
103
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
85
104
  'display_name': :'String',
105
+ 'freeform_tags': :'Hash<String, String>',
86
106
  'id': :'String',
87
107
  'lifecycle_state': :'String',
88
108
  'customer_reference_name': :'String',
@@ -98,7 +118,9 @@ module OCI
98
118
  # Initializes the object
99
119
  # @param [Hash] attributes Model attributes in the form of hash
100
120
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
121
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
101
122
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
123
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
102
124
  # @option attributes [String] :id The value to assign to the {#id} property
103
125
  # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
104
126
  # @option attributes [String] :customer_reference_name The value to assign to the {#customer_reference_name} property
@@ -115,12 +137,24 @@ module OCI
115
137
 
116
138
  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
117
139
 
140
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
141
+
142
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
143
+
144
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
145
+
118
146
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
119
147
 
120
148
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
121
149
 
122
150
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
123
151
 
152
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
153
+
154
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
155
+
156
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
157
+
124
158
  self.id = attributes[:'id'] if attributes[:'id']
125
159
 
126
160
  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
@@ -167,7 +201,9 @@ module OCI
167
201
 
168
202
  self.class == other.class &&
169
203
  compartment_id == other.compartment_id &&
204
+ defined_tags == other.defined_tags &&
170
205
  display_name == other.display_name &&
206
+ freeform_tags == other.freeform_tags &&
171
207
  id == other.id &&
172
208
  lifecycle_state == other.lifecycle_state &&
173
209
  customer_reference_name == other.customer_reference_name &&
@@ -187,7 +223,7 @@ module OCI
187
223
  # Calculates hash code according to all attributes.
188
224
  # @return [Fixnum] Hash code
189
225
  def hash
190
- [compartment_id, display_name, id, lifecycle_state, customer_reference_name, time_created].hash
226
+ [compartment_id, defined_tags, display_name, freeform_tags, id, lifecycle_state, customer_reference_name, time_created].hash
191
227
  end
192
228
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
193
229
 
@@ -30,6 +30,10 @@ module OCI
30
30
  # peering information. There's one exception: for a public virtual circuit, Oracle
31
31
  # specifies the BGP IPv4 addresses.
32
32
  #
33
+ # Every `CrossConnectMapping` must have BGP IPv4 peering addresses. BGP IPv6 peering
34
+ # addresses are optional. If BGP IPv6 addresses are provided, the customer can
35
+ # exchange IPv6 routes with Oracle.
36
+ #
33
37
  class Core::Models::CrossConnectMapping
34
38
  # The key for BGP MD5 authentication. Only applicable if your system
35
39
  # requires MD5 authentication. If empty or not set (null), that
@@ -71,6 +75,31 @@ module OCI
71
75
  # @return [String]
72
76
  attr_accessor :oracle_bgp_peering_ip
73
77
 
78
+ # The BGP IPv6 address for the router on the other end of the BGP session from
79
+ # Oracle. Specified by the owner of that router. If the session goes from Oracle
80
+ # to a customer, this is the BGP IPv6 address of the customer's edge router. If the
81
+ # session goes from Oracle to a provider, this is the BGP IPv6 address of the
82
+ # provider's edge router. Only subnet masks from /64 up to /127 are allowed.
83
+ #
84
+ # There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses.
85
+ #
86
+ # Example: `2001:db8::1/64`
87
+ #
88
+ # @return [String]
89
+ attr_accessor :customer_bgp_peering_ipv6
90
+
91
+ # The IPv6 address for Oracle's end of the BGP session. Only subnet masks from /64 up to /127 are allowed.
92
+ # If the session goes from Oracle to a customer's edge router,
93
+ # the customer specifies this information. If the session goes from Oracle to
94
+ # a provider's edge router, the provider specifies this.
95
+ #
96
+ # There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses.
97
+ #
98
+ # Example: `2001:db8::2/64`
99
+ #
100
+ # @return [String]
101
+ attr_accessor :oracle_bgp_peering_ipv6
102
+
74
103
  # The number of the specific VLAN (on the cross-connect or cross-connect group)
75
104
  # that is assigned to this virtual circuit. Specified by the owner of the cross-connect
76
105
  # or cross-connect group (the customer if the customer is colocated with Oracle, or
@@ -89,6 +118,8 @@ module OCI
89
118
  'cross_connect_or_cross_connect_group_id': :'crossConnectOrCrossConnectGroupId',
90
119
  'customer_bgp_peering_ip': :'customerBgpPeeringIp',
91
120
  'oracle_bgp_peering_ip': :'oracleBgpPeeringIp',
121
+ 'customer_bgp_peering_ipv6': :'customerBgpPeeringIpv6',
122
+ 'oracle_bgp_peering_ipv6': :'oracleBgpPeeringIpv6',
92
123
  'vlan': :'vlan'
93
124
  # rubocop:enable Style/SymbolLiteral
94
125
  }
@@ -102,6 +133,8 @@ module OCI
102
133
  'cross_connect_or_cross_connect_group_id': :'String',
103
134
  'customer_bgp_peering_ip': :'String',
104
135
  'oracle_bgp_peering_ip': :'String',
136
+ 'customer_bgp_peering_ipv6': :'String',
137
+ 'oracle_bgp_peering_ipv6': :'String',
105
138
  'vlan': :'Integer'
106
139
  # rubocop:enable Style/SymbolLiteral
107
140
  }
@@ -117,6 +150,8 @@ module OCI
117
150
  # @option attributes [String] :cross_connect_or_cross_connect_group_id The value to assign to the {#cross_connect_or_cross_connect_group_id} property
118
151
  # @option attributes [String] :customer_bgp_peering_ip The value to assign to the {#customer_bgp_peering_ip} property
119
152
  # @option attributes [String] :oracle_bgp_peering_ip The value to assign to the {#oracle_bgp_peering_ip} property
153
+ # @option attributes [String] :customer_bgp_peering_ipv6 The value to assign to the {#customer_bgp_peering_ipv6} property
154
+ # @option attributes [String] :oracle_bgp_peering_ipv6 The value to assign to the {#oracle_bgp_peering_ipv6} property
120
155
  # @option attributes [Integer] :vlan The value to assign to the {#vlan} property
121
156
  def initialize(attributes = {})
122
157
  return unless attributes.is_a?(Hash)
@@ -148,6 +183,18 @@ module OCI
148
183
 
149
184
  self.oracle_bgp_peering_ip = attributes[:'oracle_bgp_peering_ip'] if attributes[:'oracle_bgp_peering_ip']
150
185
 
186
+ self.customer_bgp_peering_ipv6 = attributes[:'customerBgpPeeringIpv6'] if attributes[:'customerBgpPeeringIpv6']
187
+
188
+ raise 'You cannot provide both :customerBgpPeeringIpv6 and :customer_bgp_peering_ipv6' if attributes.key?(:'customerBgpPeeringIpv6') && attributes.key?(:'customer_bgp_peering_ipv6')
189
+
190
+ self.customer_bgp_peering_ipv6 = attributes[:'customer_bgp_peering_ipv6'] if attributes[:'customer_bgp_peering_ipv6']
191
+
192
+ self.oracle_bgp_peering_ipv6 = attributes[:'oracleBgpPeeringIpv6'] if attributes[:'oracleBgpPeeringIpv6']
193
+
194
+ raise 'You cannot provide both :oracleBgpPeeringIpv6 and :oracle_bgp_peering_ipv6' if attributes.key?(:'oracleBgpPeeringIpv6') && attributes.key?(:'oracle_bgp_peering_ipv6')
195
+
196
+ self.oracle_bgp_peering_ipv6 = attributes[:'oracle_bgp_peering_ipv6'] if attributes[:'oracle_bgp_peering_ipv6']
197
+
151
198
  self.vlan = attributes[:'vlan'] if attributes[:'vlan']
152
199
  end
153
200
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
@@ -166,6 +213,8 @@ module OCI
166
213
  cross_connect_or_cross_connect_group_id == other.cross_connect_or_cross_connect_group_id &&
167
214
  customer_bgp_peering_ip == other.customer_bgp_peering_ip &&
168
215
  oracle_bgp_peering_ip == other.oracle_bgp_peering_ip &&
216
+ customer_bgp_peering_ipv6 == other.customer_bgp_peering_ipv6 &&
217
+ oracle_bgp_peering_ipv6 == other.oracle_bgp_peering_ipv6 &&
169
218
  vlan == other.vlan
170
219
  end
171
220
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
@@ -182,7 +231,7 @@ module OCI
182
231
  # Calculates hash code according to all attributes.
183
232
  # @return [Fixnum] Hash code
184
233
  def hash
185
- [bgp_md5_auth_key, cross_connect_or_cross_connect_group_id, customer_bgp_peering_ip, oracle_bgp_peering_ip, vlan].hash
234
+ [bgp_md5_auth_key, cross_connect_or_cross_connect_group_id, customer_bgp_peering_ip, oracle_bgp_peering_ip, customer_bgp_peering_ipv6, oracle_bgp_peering_ipv6, vlan].hash
186
235
  end
187
236
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
188
237
 
@@ -18,7 +18,7 @@ module OCI
18
18
  #
19
19
  # Allowed values:
20
20
  #
21
- # * IP address range in CIDR notation. For example: `192.168.1.0/24`
21
+ # * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
22
22
  #
23
23
  # * The `cidrBlock` value for a {Service}, if you're
24
24
  # setting up a security list rule for traffic destined for a particular `Service` through
@@ -40,12 +40,15 @@ module OCI
40
40
  # @return [String]
41
41
  attr_reader :destination_type
42
42
 
43
- # Optional and valid only for ICMP. Use to specify a particular ICMP type and code
44
- # as defined in
45
- # [ICMP Parameters](http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml).
46
- # If you specify ICMP as the protocol but omit this object, then all ICMP types and
43
+ # Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code
44
+ # as defined in:
45
+ #
46
+ # * [ICMP Parameters](http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml)
47
+ # * [ICMPv6 Parameters](https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml)
48
+ #
49
+ # If you specify ICMP or ICMPv6 as the protocol but omit this object, then all ICMP types and
47
50
  # codes are allowed. If you do provide this object, the type is required and the code is optional.
48
- # To enable MTU negotiation for ingress internet traffic, make sure to allow type 3 (\"Destination
51
+ # To enable MTU negotiation for ingress internet traffic via IPv4, make sure to allow type 3 (\"Destination
49
52
  # Unreachable\") code 4 (\"Fragmentation Needed and Don't Fragment was Set\"). If you need to specify
50
53
  # multiple codes for a single type, create a separate security list rule for each.
51
54
  #
@@ -64,7 +67,7 @@ module OCI
64
67
  # **[Required]** The transport protocol. Specify either `all` or an IPv4 protocol number as
65
68
  # defined in
66
69
  # [Protocol Numbers](http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
67
- # Options are supported only for ICMP (\"1\"), TCP (\"6\"), and UDP (\"17\").
70
+ # Options are supported only for ICMP (\"1\"), TCP (\"6\"), UDP (\"17\"), and ICMPv6 (\"58\").
68
71
  #
69
72
  # @return [String]
70
73
  attr_accessor :protocol
@@ -13,12 +13,15 @@ module OCI
13
13
  SOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
14
14
  ].freeze
15
15
 
16
- # Optional and valid only for ICMP. Use to specify a particular ICMP type and code
17
- # as defined in
18
- # [ICMP Parameters](http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml).
19
- # If you specify ICMP as the protocol but omit this object, then all ICMP types and
16
+ # Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code
17
+ # as defined in:
18
+ #
19
+ # * [ICMP Parameters](http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml)
20
+ # * [ICMPv6 Parameters](https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml)
21
+ #
22
+ # If you specify ICMP or ICMPv6 as the protocol but omit this object, then all ICMP types and
20
23
  # codes are allowed. If you do provide this object, the type is required and the code is optional.
21
- # To enable MTU negotiation for ingress internet traffic, make sure to allow type 3 (\"Destination
24
+ # To enable MTU negotiation for ingress internet traffic via IPv4, make sure to allow type 3 (\"Destination
22
25
  # Unreachable\") code 4 (\"Fragmentation Needed and Don't Fragment was Set\"). If you need to specify
23
26
  # multiple codes for a single type, create a separate security list rule for each.
24
27
  #
@@ -37,7 +40,7 @@ module OCI
37
40
  # **[Required]** The transport protocol. Specify either `all` or an IPv4 protocol number as
38
41
  # defined in
39
42
  # [Protocol Numbers](http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
40
- # Options are supported only for ICMP (\"1\"), TCP (\"6\"), and UDP (\"17\").
43
+ # Options are supported only for ICMP (\"1\"), TCP (\"6\"), UDP (\"17\"), and ICMPv6 (\"58\").
41
44
  #
42
45
  # @return [String]
43
46
  attr_accessor :protocol
@@ -47,7 +50,7 @@ module OCI
47
50
  #
48
51
  # Allowed values:
49
52
  #
50
- # * IP address range in CIDR notation. For example: `192.168.1.0/24`
53
+ # * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`
51
54
  #
52
55
  # * The `cidrBlock` value for a {Service}, if you're
53
56
  # setting up a security list rule for traffic coming from a particular `Service` through
@@ -27,6 +27,7 @@ module OCI
27
27
  ].freeze
28
28
 
29
29
  LIFECYCLE_STATE_ENUM = [
30
+ LIFECYCLE_STATE_MOVING = 'MOVING'.freeze,
30
31
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
31
32
  LIFECYCLE_STATE_RUNNING = 'RUNNING'.freeze,
32
33
  LIFECYCLE_STATE_STARTING = 'STARTING'.freeze,
@@ -0,0 +1,375 @@
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
+ # An *IPv6* is a conceptual term that refers to an IPv6 address and related properties.
9
+ # The `IPv6` object is the API representation of an IPv6.
10
+ #
11
+ # You can create and assign an IPv6 to any VNIC that is in an IPv6-enabled subnet in an
12
+ # IPv6-enabled VCN.
13
+ #
14
+ # For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/Content/Network/Concepts/ipv6.htm).
15
+ #
16
+ class Core::Models::Ipv6
17
+ LIFECYCLE_STATE_ENUM = [
18
+ LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
19
+ LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
20
+ LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
21
+ LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
22
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
23
+ ].freeze
24
+
25
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment containing the IPv6.
26
+ # This is the same as the VNIC's compartment.
27
+ #
28
+ # @return [String]
29
+ attr_accessor :compartment_id
30
+
31
+ # Defined tags for this resource. Each key is predefined and scoped to a
32
+ # namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
33
+ #
34
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
35
+ #
36
+ # @return [Hash<String, Hash<String, Object>>]
37
+ attr_accessor :defined_tags
38
+
39
+ # **[Required]** A user-friendly name. Does not have to be unique, and it's changeable. Avoid
40
+ # entering confidential information.
41
+ #
42
+ # @return [String]
43
+ attr_accessor :display_name
44
+
45
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
46
+ # predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
47
+ #
48
+ # Example: `{\"Department\": \"Finance\"}`
49
+ #
50
+ # @return [Hash<String, String>]
51
+ attr_accessor :freeform_tags
52
+
53
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the IPv6.
54
+ # @return [String]
55
+ attr_accessor :id
56
+
57
+ # **[Required]** The IPv6 address of the `IPv6` object. The address is within the private IPv6 CIDR block
58
+ # of the VNIC's subnet (see the `ipv6CidrBlock` attribute for the {Subnet}
59
+ # object).
60
+ #
61
+ # Example: `2001:0db8:0123:1111:abcd:ef01:2345:6789`
62
+ #
63
+ # @return [String]
64
+ attr_accessor :ip_address
65
+
66
+ # Whether the IPv6 can be used for internet communication. Allowed by default for an IPv6 in
67
+ # a public subnet. Never allowed for an IPv6 in a private subnet. If the value is `true`, the
68
+ # IPv6 uses its public IP address for internet communication.
69
+ #
70
+ # Example: `true`
71
+ #
72
+ # @return [BOOLEAN]
73
+ attr_accessor :is_internet_access_allowed
74
+
75
+ # **[Required]** The IPv6's current state.
76
+ # @return [String]
77
+ attr_reader :lifecycle_state
78
+
79
+ # The IPv6 address to be used for internet communication. The address is within the public
80
+ # IPv6 CIDR block of the VNIC's subnet (see the `ipv6PublicCidrBlock` attribute for the
81
+ # {Subnet} object).
82
+ #
83
+ # If your organization did NOT assign a custom IPv6 CIDR to the VCN for the private address
84
+ # space, Oracle provides the IPv6 CIDR and uses that same CIDR for the private and public
85
+ # address space. Therefore the `publicIpAddress` would be the same as the `ipAddress`.
86
+ #
87
+ # If your organization assigned a custom IPv6 CIDR to the VCN for the private address space,
88
+ # the right 80 bits of the IPv6 public IP (the subnet and address bits) are the same as for
89
+ # the `ipAddress`. But the left 48 bits are from the public IPv6 CIDR that Oracle assigned
90
+ # to the VCN.
91
+ #
92
+ # This is null if the IPv6 is created with `isInternetAccessAllowed` set to `false`.
93
+ #
94
+ # Example: `2001:0db8:0123:1111:abcd:ef01:2345:6789`
95
+ #
96
+ # @return [String]
97
+ attr_accessor :public_ip_address
98
+
99
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in.
100
+ # @return [String]
101
+ attr_accessor :subnet_id
102
+
103
+ # **[Required]** The date and time the IPv6 was created, in the format defined by RFC3339.
104
+ #
105
+ # Example: `2016-08-25T21:10:29.600Z`
106
+ #
107
+ # @return [DateTime]
108
+ attr_accessor :time_created
109
+
110
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VNIC the IPv6 is assigned to.
111
+ # The VNIC and IPv6 must be in the same subnet.
112
+ #
113
+ # @return [String]
114
+ attr_accessor :vnic_id
115
+
116
+ # Attribute mapping from ruby-style variable name to JSON key.
117
+ def self.attribute_map
118
+ {
119
+ # rubocop:disable Style/SymbolLiteral
120
+ 'compartment_id': :'compartmentId',
121
+ 'defined_tags': :'definedTags',
122
+ 'display_name': :'displayName',
123
+ 'freeform_tags': :'freeformTags',
124
+ 'id': :'id',
125
+ 'ip_address': :'ipAddress',
126
+ 'is_internet_access_allowed': :'isInternetAccessAllowed',
127
+ 'lifecycle_state': :'lifecycleState',
128
+ 'public_ip_address': :'publicIpAddress',
129
+ 'subnet_id': :'subnetId',
130
+ 'time_created': :'timeCreated',
131
+ 'vnic_id': :'vnicId'
132
+ # rubocop:enable Style/SymbolLiteral
133
+ }
134
+ end
135
+
136
+ # Attribute type mapping.
137
+ def self.swagger_types
138
+ {
139
+ # rubocop:disable Style/SymbolLiteral
140
+ 'compartment_id': :'String',
141
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
142
+ 'display_name': :'String',
143
+ 'freeform_tags': :'Hash<String, String>',
144
+ 'id': :'String',
145
+ 'ip_address': :'String',
146
+ 'is_internet_access_allowed': :'BOOLEAN',
147
+ 'lifecycle_state': :'String',
148
+ 'public_ip_address': :'String',
149
+ 'subnet_id': :'String',
150
+ 'time_created': :'DateTime',
151
+ 'vnic_id': :'String'
152
+ # rubocop:enable Style/SymbolLiteral
153
+ }
154
+ end
155
+
156
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
157
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
158
+
159
+
160
+ # Initializes the object
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
163
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
164
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
165
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
166
+ # @option attributes [String] :id The value to assign to the {#id} property
167
+ # @option attributes [String] :ip_address The value to assign to the {#ip_address} property
168
+ # @option attributes [BOOLEAN] :is_internet_access_allowed The value to assign to the {#is_internet_access_allowed} property
169
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
170
+ # @option attributes [String] :public_ip_address The value to assign to the {#public_ip_address} property
171
+ # @option attributes [String] :subnet_id The value to assign to the {#subnet_id} property
172
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
173
+ # @option attributes [String] :vnic_id The value to assign to the {#vnic_id} property
174
+ def initialize(attributes = {})
175
+ return unless attributes.is_a?(Hash)
176
+
177
+ # convert string to symbol for hash key
178
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
179
+
180
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
181
+
182
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
183
+
184
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
185
+
186
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
187
+
188
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
189
+
190
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
191
+
192
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
193
+
194
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
195
+
196
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
197
+
198
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
199
+
200
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
201
+
202
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
203
+
204
+ self.id = attributes[:'id'] if attributes[:'id']
205
+
206
+ self.ip_address = attributes[:'ipAddress'] if attributes[:'ipAddress']
207
+
208
+ raise 'You cannot provide both :ipAddress and :ip_address' if attributes.key?(:'ipAddress') && attributes.key?(:'ip_address')
209
+
210
+ self.ip_address = attributes[:'ip_address'] if attributes[:'ip_address']
211
+
212
+ self.is_internet_access_allowed = attributes[:'isInternetAccessAllowed'] unless attributes[:'isInternetAccessAllowed'].nil?
213
+
214
+ raise 'You cannot provide both :isInternetAccessAllowed and :is_internet_access_allowed' if attributes.key?(:'isInternetAccessAllowed') && attributes.key?(:'is_internet_access_allowed')
215
+
216
+ self.is_internet_access_allowed = attributes[:'is_internet_access_allowed'] unless attributes[:'is_internet_access_allowed'].nil?
217
+
218
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
219
+
220
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
221
+
222
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
223
+
224
+ self.public_ip_address = attributes[:'publicIpAddress'] if attributes[:'publicIpAddress']
225
+
226
+ raise 'You cannot provide both :publicIpAddress and :public_ip_address' if attributes.key?(:'publicIpAddress') && attributes.key?(:'public_ip_address')
227
+
228
+ self.public_ip_address = attributes[:'public_ip_address'] if attributes[:'public_ip_address']
229
+
230
+ self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId']
231
+
232
+ raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id')
233
+
234
+ self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id']
235
+
236
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
237
+
238
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
239
+
240
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
241
+
242
+ self.vnic_id = attributes[:'vnicId'] if attributes[:'vnicId']
243
+
244
+ raise 'You cannot provide both :vnicId and :vnic_id' if attributes.key?(:'vnicId') && attributes.key?(:'vnic_id')
245
+
246
+ self.vnic_id = attributes[:'vnic_id'] if attributes[:'vnic_id']
247
+ end
248
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
249
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
250
+
251
+ # Custom attribute writer method checking allowed values (enum).
252
+ # @param [Object] lifecycle_state Object to be assigned
253
+ def lifecycle_state=(lifecycle_state)
254
+ # rubocop:disable Style/ConditionalAssignment
255
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
256
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
257
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
258
+ else
259
+ @lifecycle_state = lifecycle_state
260
+ end
261
+ # rubocop:enable Style/ConditionalAssignment
262
+ end
263
+
264
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
265
+
266
+
267
+ # Checks equality by comparing each attribute.
268
+ # @param [Object] other the other object to be compared
269
+ def ==(other)
270
+ return true if equal?(other)
271
+
272
+ self.class == other.class &&
273
+ compartment_id == other.compartment_id &&
274
+ defined_tags == other.defined_tags &&
275
+ display_name == other.display_name &&
276
+ freeform_tags == other.freeform_tags &&
277
+ id == other.id &&
278
+ ip_address == other.ip_address &&
279
+ is_internet_access_allowed == other.is_internet_access_allowed &&
280
+ lifecycle_state == other.lifecycle_state &&
281
+ public_ip_address == other.public_ip_address &&
282
+ subnet_id == other.subnet_id &&
283
+ time_created == other.time_created &&
284
+ vnic_id == other.vnic_id
285
+ end
286
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
287
+
288
+ # @see the `==` method
289
+ # @param [Object] other the other object to be compared
290
+ def eql?(other)
291
+ self == other
292
+ end
293
+
294
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
295
+
296
+
297
+ # Calculates hash code according to all attributes.
298
+ # @return [Fixnum] Hash code
299
+ def hash
300
+ [compartment_id, defined_tags, display_name, freeform_tags, id, ip_address, is_internet_access_allowed, lifecycle_state, public_ip_address, subnet_id, time_created, vnic_id].hash
301
+ end
302
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
303
+
304
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
305
+
306
+
307
+ # Builds the object from hash
308
+ # @param [Hash] attributes Model attributes in the form of hash
309
+ # @return [Object] Returns the model itself
310
+ def build_from_hash(attributes)
311
+ return nil unless attributes.is_a?(Hash)
312
+
313
+ self.class.swagger_types.each_pair do |key, type|
314
+ if type =~ /^Array<(.*)>/i
315
+ # check to ensure the input is an array given that the the attribute
316
+ # is documented as an array but the input is not
317
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
318
+ public_method("#{key}=").call(
319
+ attributes[self.class.attribute_map[key]]
320
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
321
+ )
322
+ end
323
+ elsif !attributes[self.class.attribute_map[key]].nil?
324
+ public_method("#{key}=").call(
325
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
326
+ )
327
+ end
328
+ # or else data not found in attributes(hash), not an issue as the data can be optional
329
+ end
330
+
331
+ self
332
+ end
333
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
334
+
335
+ # Returns the string representation of the object
336
+ # @return [String] String presentation of the object
337
+ def to_s
338
+ to_hash.to_s
339
+ end
340
+
341
+ # Returns the object in the form of hash
342
+ # @return [Hash] Returns the object in the form of hash
343
+ def to_hash
344
+ hash = {}
345
+ self.class.attribute_map.each_pair do |attr, param|
346
+ value = public_method(attr).call
347
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
348
+
349
+ hash[param] = _to_hash(value)
350
+ end
351
+ hash
352
+ end
353
+
354
+ private
355
+
356
+ # Outputs non-array value in the form of hash
357
+ # For object, use to_hash. Otherwise, just return the value
358
+ # @param [Object] value Any valid value
359
+ # @return [Hash] Returns the value in the form of hash
360
+ def _to_hash(value)
361
+ if value.is_a?(Array)
362
+ value.compact.map { |v| _to_hash(v) }
363
+ elsif value.is_a?(Hash)
364
+ {}.tap do |hash|
365
+ value.each { |k, v| hash[k] = _to_hash(v) }
366
+ end
367
+ elsif value.respond_to? :to_hash
368
+ value.to_hash
369
+ else
370
+ value
371
+ end
372
+ end
373
+ end
374
+ end
375
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength