oci 2.5.10 → 2.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -4,9 +4,9 @@ require 'date'
4
4
 
5
5
  # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
6
  module OCI
7
- # Contains details indicating which compartment the resource should move to
7
+ # Contains the details for the compartment to move the volume backup to.
8
8
  class Core::Models::ChangeVolumeBackupCompartmentDetails
9
- # **[Required]** The OCID of the new compartment
9
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the volume backup to.
10
10
  # @return [String]
11
11
  attr_accessor :compartment_id
12
12
 
@@ -4,9 +4,9 @@ require 'date'
4
4
 
5
5
  # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
6
  module OCI
7
- # Contains details indicating which compartment the resource should move to
7
+ # Contains the details for the compartment to move the volume to.
8
8
  class Core::Models::ChangeVolumeCompartmentDetails
9
- # **[Required]** The OCID of the new compartment
9
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the volume to.
10
10
  # @return [String]
11
11
  attr_accessor :compartment_id
12
12
 
@@ -4,9 +4,9 @@ require 'date'
4
4
 
5
5
  # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
6
  module OCI
7
- # Contains details indicating which compartment the resource should move to
7
+ # Contains the details for the compartment to move the volume group backup to.
8
8
  class Core::Models::ChangeVolumeGroupBackupCompartmentDetails
9
- # **[Required]** The OCID of the new compartment
9
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the volume group backup to.
10
10
  # @return [String]
11
11
  attr_accessor :compartment_id
12
12
 
@@ -4,9 +4,9 @@ require 'date'
4
4
 
5
5
  # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
6
  module OCI
7
- # Contains details indicating which compartment the resource should move to
7
+ # Contains the details for the compartment to move the volume group to.
8
8
  class Core::Models::ChangeVolumeGroupCompartmentDetails
9
- # **[Required]** The OCID of the new compartment
9
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to move the volume group to.
10
10
  # @return [String]
11
11
  attr_accessor :compartment_id
12
12
 
@@ -19,12 +19,26 @@ module OCI
19
19
  # @return [String]
20
20
  attr_accessor :display_name
21
21
 
22
+ # The OCID of the KMS key in the destination region which will be the master encryption key
23
+ # for the copied volume backup.
24
+ # If you do not specify this attribute the volume backup will be encrypted with the Oracle-provided encryption
25
+ # key when it is copied to the destination region.
26
+ #
27
+ #
28
+ # For more information about the Key Management service and encryption keys, see
29
+ # [Overview of Key Management](https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm) and
30
+ # [Using Keys](https://docs.cloud.oracle.com/Content/KeyManagement/Tasks/usingkeys.htm).
31
+ #
32
+ # @return [String]
33
+ attr_accessor :kms_key_id
34
+
22
35
  # Attribute mapping from ruby-style variable name to JSON key.
23
36
  def self.attribute_map
24
37
  {
25
38
  # rubocop:disable Style/SymbolLiteral
26
39
  'destination_region': :'destinationRegion',
27
- 'display_name': :'displayName'
40
+ 'display_name': :'displayName',
41
+ 'kms_key_id': :'kmsKeyId'
28
42
  # rubocop:enable Style/SymbolLiteral
29
43
  }
30
44
  end
@@ -34,7 +48,8 @@ module OCI
34
48
  {
35
49
  # rubocop:disable Style/SymbolLiteral
36
50
  'destination_region': :'String',
37
- 'display_name': :'String'
51
+ 'display_name': :'String',
52
+ 'kms_key_id': :'String'
38
53
  # rubocop:enable Style/SymbolLiteral
39
54
  }
40
55
  end
@@ -47,6 +62,7 @@ module OCI
47
62
  # @param [Hash] attributes Model attributes in the form of hash
48
63
  # @option attributes [String] :destination_region The value to assign to the {#destination_region} property
49
64
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
65
+ # @option attributes [String] :kms_key_id The value to assign to the {#kms_key_id} property
50
66
  def initialize(attributes = {})
51
67
  return unless attributes.is_a?(Hash)
52
68
 
@@ -64,6 +80,12 @@ module OCI
64
80
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
65
81
 
66
82
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
83
+
84
+ self.kms_key_id = attributes[:'kmsKeyId'] if attributes[:'kmsKeyId']
85
+
86
+ raise 'You cannot provide both :kmsKeyId and :kms_key_id' if attributes.key?(:'kmsKeyId') && attributes.key?(:'kms_key_id')
87
+
88
+ self.kms_key_id = attributes[:'kms_key_id'] if attributes[:'kms_key_id']
67
89
  end
68
90
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
69
91
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -78,7 +100,8 @@ module OCI
78
100
 
79
101
  self.class == other.class &&
80
102
  destination_region == other.destination_region &&
81
- display_name == other.display_name
103
+ display_name == other.display_name &&
104
+ kms_key_id == other.kms_key_id
82
105
  end
83
106
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
84
107
 
@@ -94,7 +117,7 @@ module OCI
94
117
  # Calculates hash code according to all attributes.
95
118
  # @return [Fixnum] Hash code
96
119
  def hash
97
- [destination_region, display_name].hash
120
+ [destination_region, display_name, kms_key_id].hash
98
121
  end
99
122
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
100
123
 
@@ -14,6 +14,14 @@ module OCI
14
14
  # @return [String]
15
15
  attr_accessor :cross_connect_group_id
16
16
 
17
+ # Defined tags for this resource. Each key is predefined and scoped to a
18
+ # namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
19
+ #
20
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
21
+ #
22
+ # @return [Hash<String, Hash<String, Object>>]
23
+ attr_accessor :defined_tags
24
+
17
25
  # A user-friendly name. Does not have to be unique, and it's changeable.
18
26
  # Avoid entering confidential information.
19
27
  #
@@ -28,6 +36,14 @@ module OCI
28
36
  # @return [String]
29
37
  attr_accessor :far_cross_connect_or_cross_connect_group_id
30
38
 
39
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
40
+ # predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
41
+ #
42
+ # Example: `{\"Department\": \"Finance\"}`
43
+ #
44
+ # @return [Hash<String, String>]
45
+ attr_accessor :freeform_tags
46
+
31
47
  # **[Required]** The name of the FastConnect location where this cross-connect will be installed.
32
48
  # To get a list of the available locations, see
33
49
  # {#list_cross_connect_locations list_cross_connect_locations}.
@@ -64,8 +80,10 @@ module OCI
64
80
  # rubocop:disable Style/SymbolLiteral
65
81
  'compartment_id': :'compartmentId',
66
82
  'cross_connect_group_id': :'crossConnectGroupId',
83
+ 'defined_tags': :'definedTags',
67
84
  'display_name': :'displayName',
68
85
  'far_cross_connect_or_cross_connect_group_id': :'farCrossConnectOrCrossConnectGroupId',
86
+ 'freeform_tags': :'freeformTags',
69
87
  'location_name': :'locationName',
70
88
  'near_cross_connect_or_cross_connect_group_id': :'nearCrossConnectOrCrossConnectGroupId',
71
89
  'port_speed_shape_name': :'portSpeedShapeName',
@@ -80,8 +98,10 @@ module OCI
80
98
  # rubocop:disable Style/SymbolLiteral
81
99
  'compartment_id': :'String',
82
100
  'cross_connect_group_id': :'String',
101
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
83
102
  'display_name': :'String',
84
103
  'far_cross_connect_or_cross_connect_group_id': :'String',
104
+ 'freeform_tags': :'Hash<String, String>',
85
105
  'location_name': :'String',
86
106
  'near_cross_connect_or_cross_connect_group_id': :'String',
87
107
  'port_speed_shape_name': :'String',
@@ -98,8 +118,10 @@ module OCI
98
118
  # @param [Hash] attributes Model attributes in the form of hash
99
119
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
100
120
  # @option attributes [String] :cross_connect_group_id The value to assign to the {#cross_connect_group_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
102
123
  # @option attributes [String] :far_cross_connect_or_cross_connect_group_id The value to assign to the {#far_cross_connect_or_cross_connect_group_id} property
124
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
103
125
  # @option attributes [String] :location_name The value to assign to the {#location_name} property
104
126
  # @option attributes [String] :near_cross_connect_or_cross_connect_group_id The value to assign to the {#near_cross_connect_or_cross_connect_group_id} property
105
127
  # @option attributes [String] :port_speed_shape_name The value to assign to the {#port_speed_shape_name} property
@@ -122,6 +144,12 @@ module OCI
122
144
 
123
145
  self.cross_connect_group_id = attributes[:'cross_connect_group_id'] if attributes[:'cross_connect_group_id']
124
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
+
125
153
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
126
154
 
127
155
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
@@ -134,6 +162,12 @@ module OCI
134
162
 
135
163
  self.far_cross_connect_or_cross_connect_group_id = attributes[:'far_cross_connect_or_cross_connect_group_id'] if attributes[:'far_cross_connect_or_cross_connect_group_id']
136
164
 
165
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
166
+
167
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
168
+
169
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
170
+
137
171
  self.location_name = attributes[:'locationName'] if attributes[:'locationName']
138
172
 
139
173
  raise 'You cannot provide both :locationName and :location_name' if attributes.key?(:'locationName') && attributes.key?(:'location_name')
@@ -172,8 +206,10 @@ module OCI
172
206
  self.class == other.class &&
173
207
  compartment_id == other.compartment_id &&
174
208
  cross_connect_group_id == other.cross_connect_group_id &&
209
+ defined_tags == other.defined_tags &&
175
210
  display_name == other.display_name &&
176
211
  far_cross_connect_or_cross_connect_group_id == other.far_cross_connect_or_cross_connect_group_id &&
212
+ freeform_tags == other.freeform_tags &&
177
213
  location_name == other.location_name &&
178
214
  near_cross_connect_or_cross_connect_group_id == other.near_cross_connect_or_cross_connect_group_id &&
179
215
  port_speed_shape_name == other.port_speed_shape_name &&
@@ -193,7 +229,7 @@ module OCI
193
229
  # Calculates hash code according to all attributes.
194
230
  # @return [Fixnum] Hash code
195
231
  def hash
196
- [compartment_id, cross_connect_group_id, display_name, far_cross_connect_or_cross_connect_group_id, location_name, near_cross_connect_or_cross_connect_group_id, port_speed_shape_name, customer_reference_name].hash
232
+ [compartment_id, cross_connect_group_id, defined_tags, display_name, far_cross_connect_or_cross_connect_group_id, freeform_tags, location_name, near_cross_connect_or_cross_connect_group_id, port_speed_shape_name, customer_reference_name].hash
197
233
  end
198
234
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
199
235
 
@@ -10,6 +10,14 @@ module OCI
10
10
  # @return [String]
11
11
  attr_accessor :compartment_id
12
12
 
13
+ # Defined tags for this resource. Each key is predefined and scoped to a
14
+ # namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
15
+ #
16
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
17
+ #
18
+ # @return [Hash<String, Hash<String, Object>>]
19
+ attr_accessor :defined_tags
20
+
13
21
  # A user-friendly name. Does not have to be unique, and it's changeable.
14
22
  # Avoid entering confidential information.
15
23
  #
@@ -22,13 +30,23 @@ module OCI
22
30
  # @return [String]
23
31
  attr_accessor :customer_reference_name
24
32
 
33
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
34
+ # predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
35
+ #
36
+ # Example: `{\"Department\": \"Finance\"}`
37
+ #
38
+ # @return [Hash<String, String>]
39
+ attr_accessor :freeform_tags
40
+
25
41
  # Attribute mapping from ruby-style variable name to JSON key.
26
42
  def self.attribute_map
27
43
  {
28
44
  # rubocop:disable Style/SymbolLiteral
29
45
  'compartment_id': :'compartmentId',
46
+ 'defined_tags': :'definedTags',
30
47
  'display_name': :'displayName',
31
- 'customer_reference_name': :'customerReferenceName'
48
+ 'customer_reference_name': :'customerReferenceName',
49
+ 'freeform_tags': :'freeformTags'
32
50
  # rubocop:enable Style/SymbolLiteral
33
51
  }
34
52
  end
@@ -38,8 +56,10 @@ module OCI
38
56
  {
39
57
  # rubocop:disable Style/SymbolLiteral
40
58
  'compartment_id': :'String',
59
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
41
60
  'display_name': :'String',
42
- 'customer_reference_name': :'String'
61
+ 'customer_reference_name': :'String',
62
+ 'freeform_tags': :'Hash<String, String>'
43
63
  # rubocop:enable Style/SymbolLiteral
44
64
  }
45
65
  end
@@ -51,8 +71,10 @@ module OCI
51
71
  # Initializes the object
52
72
  # @param [Hash] attributes Model attributes in the form of hash
53
73
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
74
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
54
75
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
55
76
  # @option attributes [String] :customer_reference_name The value to assign to the {#customer_reference_name} property
77
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
56
78
  def initialize(attributes = {})
57
79
  return unless attributes.is_a?(Hash)
58
80
 
@@ -65,6 +87,12 @@ module OCI
65
87
 
66
88
  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
67
89
 
90
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
91
+
92
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
93
+
94
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
95
+
68
96
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
69
97
 
70
98
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
@@ -76,6 +104,12 @@ module OCI
76
104
  raise 'You cannot provide both :customerReferenceName and :customer_reference_name' if attributes.key?(:'customerReferenceName') && attributes.key?(:'customer_reference_name')
77
105
 
78
106
  self.customer_reference_name = attributes[:'customer_reference_name'] if attributes[:'customer_reference_name']
107
+
108
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
109
+
110
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
111
+
112
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
79
113
  end
80
114
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
81
115
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -90,8 +124,10 @@ module OCI
90
124
 
91
125
  self.class == other.class &&
92
126
  compartment_id == other.compartment_id &&
127
+ defined_tags == other.defined_tags &&
93
128
  display_name == other.display_name &&
94
- customer_reference_name == other.customer_reference_name
129
+ customer_reference_name == other.customer_reference_name &&
130
+ freeform_tags == other.freeform_tags
95
131
  end
96
132
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
97
133
 
@@ -107,7 +143,7 @@ module OCI
107
143
  # Calculates hash code according to all attributes.
108
144
  # @return [Fixnum] Hash code
109
145
  def hash
110
- [compartment_id, display_name, customer_reference_name].hash
146
+ [compartment_id, defined_tags, display_name, customer_reference_name, freeform_tags].hash
111
147
  end
112
148
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
113
149
 
@@ -0,0 +1,250 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
+ module OCI
7
+ # An instance configuration that can be used to launch
8
+ #
9
+ # This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
10
+ class Core::Models::CreateInstanceConfigurationBase
11
+ SOURCE_ENUM = [
12
+ SOURCE_NONE = 'NONE'.freeze,
13
+ SOURCE_INSTANCE = 'INSTANCE'.freeze
14
+ ].freeze
15
+
16
+ # **[Required]** The OCID of the compartment containing the instance configuration.
17
+ #
18
+ # @return [String]
19
+ attr_accessor :compartment_id
20
+
21
+ # Defined tags for this resource. Each key is predefined and scoped to a
22
+ # namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
23
+ #
24
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
25
+ #
26
+ # @return [Hash<String, Hash<String, Object>>]
27
+ attr_accessor :defined_tags
28
+
29
+ # A user-friendly name for the instance configuration
30
+ #
31
+ # @return [String]
32
+ attr_accessor :display_name
33
+
34
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
35
+ # predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
36
+ #
37
+ # Example: `{\"Department\": \"Finance\"}`
38
+ #
39
+ # @return [Hash<String, String>]
40
+ attr_accessor :freeform_tags
41
+
42
+ # The source of the instance configuration:
43
+ # NONE for creating a new instance configuration from the API input. INSTANCE for creating a new instance
44
+ # configuration from an existing instance. The default is NONE.
45
+ #
46
+ # @return [String]
47
+ attr_reader :source
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ # rubocop:disable Style/SymbolLiteral
53
+ 'compartment_id': :'compartmentId',
54
+ 'defined_tags': :'definedTags',
55
+ 'display_name': :'displayName',
56
+ 'freeform_tags': :'freeformTags',
57
+ 'source': :'source'
58
+ # rubocop:enable Style/SymbolLiteral
59
+ }
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.swagger_types
64
+ {
65
+ # rubocop:disable Style/SymbolLiteral
66
+ 'compartment_id': :'String',
67
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
68
+ 'display_name': :'String',
69
+ 'freeform_tags': :'Hash<String, String>',
70
+ 'source': :'String'
71
+ # rubocop:enable Style/SymbolLiteral
72
+ }
73
+ end
74
+
75
+ # rubocop:disable Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity, Metrics/AbcSize
76
+
77
+
78
+ # Given the hash representation of a subtype of this class,
79
+ # use the info in the hash to return the class of the subtype.
80
+ def self.get_subtype(object_hash)
81
+ type = object_hash[:'source'] # rubocop:disable Style/SymbolLiteral
82
+
83
+ return 'OCI::Core::Models::CreateInstanceConfigurationDetails' if type == 'NONE'
84
+ return 'OCI::Core::Models::CreateInstanceConfigurationFromInstanceDetails' if type == 'INSTANCE'
85
+
86
+ # TODO: Log a warning when the subtype is not found.
87
+ 'OCI::Core::Models::CreateInstanceConfigurationBase'
88
+ end
89
+ # rubocop:enable Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity, Metrics/AbcSize
90
+
91
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
92
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
93
+
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
98
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
99
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
100
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
101
+ # @option attributes [String] :source The value to assign to the {#source} property
102
+ def initialize(attributes = {})
103
+ return unless attributes.is_a?(Hash)
104
+
105
+ # convert string to symbol for hash key
106
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
107
+
108
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
109
+
110
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
111
+
112
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
113
+
114
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
115
+
116
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
117
+
118
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
119
+
120
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
121
+
122
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
123
+
124
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
125
+
126
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
127
+
128
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
129
+
130
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
131
+
132
+ self.source = attributes[:'source'] if attributes[:'source']
133
+ self.source = "NONE" if source.nil? && !attributes.key?(:'source') # rubocop:disable Style/StringLiterals
134
+ end
135
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
136
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
137
+
138
+ # Custom attribute writer method checking allowed values (enum).
139
+ # @param [Object] source Object to be assigned
140
+ def source=(source)
141
+ raise "Invalid value for 'source': this must be one of the values in SOURCE_ENUM." if source && !SOURCE_ENUM.include?(source)
142
+
143
+ @source = source
144
+ end
145
+
146
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
147
+
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] other the other object to be compared
151
+ def ==(other)
152
+ return true if equal?(other)
153
+
154
+ self.class == other.class &&
155
+ compartment_id == other.compartment_id &&
156
+ defined_tags == other.defined_tags &&
157
+ display_name == other.display_name &&
158
+ freeform_tags == other.freeform_tags &&
159
+ source == other.source
160
+ end
161
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
162
+
163
+ # @see the `==` method
164
+ # @param [Object] other the other object to be compared
165
+ def eql?(other)
166
+ self == other
167
+ end
168
+
169
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
170
+
171
+
172
+ # Calculates hash code according to all attributes.
173
+ # @return [Fixnum] Hash code
174
+ def hash
175
+ [compartment_id, defined_tags, display_name, freeform_tags, source].hash
176
+ end
177
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
178
+
179
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
180
+
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+
188
+ self.class.swagger_types.each_pair do |key, type|
189
+ if type =~ /^Array<(.*)>/i
190
+ # check to ensure the input is an array given that the the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
193
+ public_method("#{key}=").call(
194
+ attributes[self.class.attribute_map[key]]
195
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
196
+ )
197
+ end
198
+ elsif !attributes[self.class.attribute_map[key]].nil?
199
+ public_method("#{key}=").call(
200
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
201
+ )
202
+ end
203
+ # or else data not found in attributes(hash), not an issue as the data can be optional
204
+ end
205
+
206
+ self
207
+ end
208
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = public_method(attr).call
222
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ private
230
+
231
+ # Outputs non-array value in the form of hash
232
+ # For object, use to_hash. Otherwise, just return the value
233
+ # @param [Object] value Any valid value
234
+ # @return [Hash] Returns the value in the form of hash
235
+ def _to_hash(value)
236
+ if value.is_a?(Array)
237
+ value.compact.map { |v| _to_hash(v) }
238
+ elsif value.is_a?(Hash)
239
+ {}.tap do |hash|
240
+ value.each { |k, v| hash[k] = _to_hash(v) }
241
+ end
242
+ elsif value.respond_to? :to_hash
243
+ value.to_hash
244
+ else
245
+ value
246
+ end
247
+ end
248
+ end
249
+ end
250
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength