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
@@ -5,8 +5,8 @@ require 'date'
5
5
  # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
6
  module OCI
7
7
  # The request details for retrieving metric definitions. Specify optional properties to filter the returned results.
8
- # Use an asterisk (\"\\*\") as a wildcard character, placed anywhere in the string.
9
- # For example, to search for all metrics with names that begin with \"disk\", specify \"name\" as \"disk\\*\".
8
+ # Use an asterisk (*) as a wildcard character, placed anywhere in the string.
9
+ # For example, to search for all metrics with names that begin with \"disk\", specify \"name\" as \"disk*\".
10
10
  # If no properties are specified, then all metric definitions within the request scope are returned.
11
11
  #
12
12
  class Monitoring::Models::ListMetricsDetails
@@ -45,8 +45,8 @@ module OCI
45
45
  # Group metrics by these fields in the response. For example, to list all metric namespaces available
46
46
  # in a compartment, groupBy the \"namespace\" field.
47
47
  #
48
- # Example - group by namespace and resource:
49
- # `[ \"namespace\", \"resourceId\" ]`
48
+ # Example - group by namespace:
49
+ # `[ \"namespace\" ]`
50
50
  #
51
51
  # @return [Array<String>]
52
52
  attr_accessor :group_by
@@ -7,6 +7,19 @@ module OCI
7
7
  # The set of aggregated data returned for a metric.
8
8
  # For information about metrics, see [Metrics Overview](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#MetricsOverview).
9
9
  #
10
+ # Limits information for returned data follows.
11
+ #
12
+ # * Data points: 100,000.
13
+ # * Metric streams* within data points: 2,000.
14
+ # * Time range returned for 1-hour resolution: 90 days.
15
+ # * Time range returned for 5-minute resolution: 30 days.
16
+ # * Time range returned for any other resolution: 7 days.
17
+ #
18
+ # *A metric stream is an individual set of aggregated data for a metric, typically specific to a single resource.
19
+ # Metric streams cannot be aggregated across metric groups.
20
+ # A metric group is the combination of a given metric, metric namespace, and tenancy for the purpose of determining limits.
21
+ # For more information about metric-related concepts, see [Monitoring Concepts](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#concepts).
22
+ #
10
23
  class Monitoring::Models::MetricData
11
24
  # **[Required]** The reference provided in a metric definition to indicate the source service or
12
25
  # application that emitted the metric.
@@ -56,6 +69,7 @@ module OCI
56
69
  attr_accessor :resolution
57
70
 
58
71
  # **[Required]** The list of timestamp-value pairs returned for the specified request. Metric values are rolled up to the start time specified in the request.
72
+ # For important limits information related to data points, see MetricData Reference at the top of this page.
59
73
  #
60
74
  # @return [Array<OCI::Monitoring::Models::AggregatedDatapoint>]
61
75
  attr_accessor :aggregated_datapoints
@@ -24,7 +24,7 @@ module OCI
24
24
 
25
25
  # **[Required]** The name of the metric.
26
26
  #
27
- # A valid name value starts with an alphabetical character and includes only alphanumeric characters, dots, underscores, hyphens, and dollar signs.
27
+ # A valid name value starts with an alphabetical character and includes only alphanumeric characters, dots, underscores, hyphens, and dollar signs. The `oci_` prefix is reserved.
28
28
  # Avoid entering confidential information.
29
29
  #
30
30
  # Example: `my_app.success_rate`
@@ -32,9 +32,10 @@ module OCI
32
32
  # @return [String]
33
33
  attr_accessor :name
34
34
 
35
- # Qualifiers provided in a metric definition. Available dimensions vary by metric namespace.
36
- #
37
- # Each dimension takes the form of a key-value pair. A valid dimension key includes only printable ASCII, excluding periods (.) and spaces. A valid dimension value includes only Unicode characters.
35
+ # **[Required]** Qualifiers provided in a metric definition. Available dimensions vary by metric namespace.
36
+ # Each dimension takes the form of a key-value pair.
37
+ # A valid dimension key includes only printable ASCII, excluding periods (.) and spaces. The character limit for a dimension key is 256.
38
+ # A valid dimension value includes only Unicode characters. The character limit for a dimension value is 256.
38
39
  # Empty strings are not allowed for keys or values. Avoid entering confidential information.
39
40
  #
40
41
  # Example: `\"resourceId\": \"ocid1.instance.region1.phx.exampleuniqueID\"`
@@ -43,6 +44,7 @@ module OCI
43
44
  attr_accessor :dimensions
44
45
 
45
46
  # Properties describing metrics. These are not part of the unique fields identifying the metric.
47
+ # Each metadata item takes the form of a key-value pair. The character limit for a metadata key is 256. The character limit for a metadata value is 256.
46
48
  #
47
49
  # Example: `\"unit\": \"bytes\"`
48
50
  #
@@ -19,6 +19,9 @@ module OCI
19
19
  # aggregate. The query must specify a metric, statistic, and interval. Supported values for
20
20
  # interval: `1m`-`60m` (also `1h`). You can optionally specify dimensions and grouping functions.
21
21
  # Supported grouping functions: `grouping()`, `groupBy()`.
22
+ #
23
+ # Construct your query to avoid exceeding limits on returned data. See {MetricData}.
24
+ #
22
25
  # For details about Monitoring Query Language (MQL), see
23
26
  # [Monitoring Query Language (MQL) Reference](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Reference/mql.htm).
24
27
  # For available dimensions, review the metric definition for the supported service.
@@ -116,9 +116,10 @@ module OCI
116
116
  # @return [String]
117
117
  attr_accessor :body
118
118
 
119
- # An array of [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) to which the notifications for
120
- # this alarm will be delivered. An example destination is an OCID for a topic managed by the
121
- # Oracle Cloud Infrastructure Notification service.
119
+ # A list of destinations to which the notifications for this alarm will be delivered.
120
+ # Each destination is represented by an [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) related to the supported destination service.
121
+ # For example, a destination using the Notifications service is represented by a topic OCID.
122
+ # Supported destination services: Notifications Service. Limit: One destination per supported destination service.
122
123
  #
123
124
  # @return [Array<String>]
124
125
  attr_accessor :destinations
@@ -16,6 +16,7 @@ require 'oci/monitoring/models/alarm_history_collection'
16
16
  require 'oci/monitoring/models/alarm_history_entry'
17
17
  require 'oci/monitoring/models/alarm_status_summary'
18
18
  require 'oci/monitoring/models/alarm_summary'
19
+ require 'oci/monitoring/models/change_alarm_compartment_details'
19
20
  require 'oci/monitoring/models/create_alarm_details'
20
21
  require 'oci/monitoring/models/datapoint'
21
22
  require 'oci/monitoring/models/failed_metric_record'
@@ -6,6 +6,7 @@ require 'logger'
6
6
  # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
7
7
  module OCI
8
8
  # Use the Monitoring API to manage metric queries and alarms for assessing the health, capacity, and performance of your cloud resources.
9
+ # Endpoints vary by operation. For PostMetric, use the &#x60;telemetry-ingestion&#x60; endpoints; for all other operations, use the &#x60;telemetry&#x60; endpoints.
9
10
  # For information about monitoring, see [Monitoring Overview](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm).
10
11
  class Monitoring::MonitoringClient
11
12
  # Client used to make HTTP requests.
@@ -95,7 +96,7 @@ module OCI
95
96
 
96
97
  raise 'A region must be specified.' unless @region
97
98
 
98
- @endpoint = OCI::Regions.get_service_endpoint(@region, :MonitoringClient) + '/20180401'
99
+ @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://telemetry.{region}.{secondLevelDomain}') + '/20180401'
99
100
  logger.info "MonitoringClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
100
101
  end
101
102
 
@@ -109,7 +110,83 @@ module OCI
109
110
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
110
111
 
111
112
 
113
+ # Moves an alarm into a different compartment within the same tenancy.
114
+ #
115
+ # For information about moving resources between compartments, see [Moving Resources Between Compartments](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
116
+ #
117
+ # @param [String] alarm_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
118
+ #
119
+ # @param [OCI::Monitoring::Models::ChangeAlarmCompartmentDetails] change_alarm_compartment_details The configuration details for moving an alarm.
120
+ # @param [Hash] opts the optional parameters
121
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
122
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
123
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
124
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
125
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
126
+ #
127
+ # @option opts [String] :opc_request_id Customer part of the request identifier token. If you need to contact Oracle about a particular
128
+ # request, please provide the complete request ID.
129
+ #
130
+ # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
131
+ # server error without risk of executing that same action again. Retry tokens expire after 24
132
+ # hours, but can be invalidated before then due to conflicting operations. For example, if a resource
133
+ # has been deleted and purged from the system, then a retry of the original creation request
134
+ # might be rejected.
135
+ #
136
+ # @return [Response] A Response object with data of type nil
137
+ def change_alarm_compartment(alarm_id, change_alarm_compartment_details, opts = {})
138
+ logger.debug 'Calling operation MonitoringClient#change_alarm_compartment.' if logger
139
+
140
+ raise "Missing the required parameter 'alarm_id' when calling change_alarm_compartment." if alarm_id.nil?
141
+ raise "Missing the required parameter 'change_alarm_compartment_details' when calling change_alarm_compartment." if change_alarm_compartment_details.nil?
142
+ raise "Parameter value for 'alarm_id' must not be blank" if OCI::Internal::Util.blank_string?(alarm_id)
143
+
144
+ path = '/alarms/{alarmId}/actions/changeCompartment'.sub('{alarmId}', alarm_id.to_s)
145
+ operation_signing_strategy = :standard
146
+
147
+ # rubocop:disable Style/NegatedIf
148
+ # Query Params
149
+ query_params = {}
150
+
151
+ # Header Params
152
+ header_params = {}
153
+ header_params[:accept] = 'application/json'
154
+ header_params[:'content-type'] = 'application/json'
155
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
156
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
157
+ header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
158
+ # rubocop:enable Style/NegatedIf
159
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
160
+
161
+ post_body = @api_client.object_to_http_body(change_alarm_compartment_details)
162
+
163
+ # rubocop:disable Metrics/BlockLength
164
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'MonitoringClient#change_alarm_compartment') do
165
+ @api_client.call_api(
166
+ :POST,
167
+ path,
168
+ endpoint,
169
+ header_params: header_params,
170
+ query_params: query_params,
171
+ operation_signing_strategy: operation_signing_strategy,
172
+ body: post_body
173
+ )
174
+ end
175
+ # rubocop:enable Metrics/BlockLength
176
+ end
177
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
178
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
179
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
180
+
181
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
182
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
183
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
184
+
185
+
112
186
  # Creates a new alarm in the specified compartment.
187
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
188
+ #
189
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
113
190
  #
114
191
  # @param [OCI::Monitoring::Models::CreateAlarmDetails] create_alarm_details Document for creating an alarm.
115
192
  # @param [Hash] opts the optional parameters
@@ -173,12 +250,19 @@ module OCI
173
250
 
174
251
 
175
252
  # Deletes the specified alarm.
253
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
254
+ #
255
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
176
256
  #
177
257
  # @param [String] alarm_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
178
258
  #
179
259
  # @param [Hash] opts the optional parameters
180
260
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
181
261
  # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
262
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
263
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
264
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
265
+ #
182
266
  # @option opts [String] :opc_request_id Customer part of the request identifier token. If you need to contact Oracle about a particular
183
267
  # request, please provide the complete request ID.
184
268
  #
@@ -200,6 +284,7 @@ module OCI
200
284
  header_params = {}
201
285
  header_params[:accept] = 'application/json'
202
286
  header_params[:'content-type'] = 'application/json'
287
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
203
288
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
204
289
  # rubocop:enable Style/NegatedIf
205
290
 
@@ -229,6 +314,9 @@ module OCI
229
314
 
230
315
 
231
316
  # Gets the specified alarm.
317
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
318
+ #
319
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
232
320
  #
233
321
  # @param [String] alarm_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
234
322
  #
@@ -286,6 +374,9 @@ module OCI
286
374
 
287
375
 
288
376
  # Get the history of the specified alarm.
377
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
378
+ #
379
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
289
380
  #
290
381
  # @param [String] alarm_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
291
382
  #
@@ -305,7 +396,6 @@ module OCI
305
396
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
306
397
  #
307
398
  # @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call.
308
- # 1 is the minimum, 1000 is the maximum.
309
399
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
310
400
  #
311
401
  # Default: 1000
@@ -377,11 +467,16 @@ module OCI
377
467
 
378
468
 
379
469
  # Lists the alarms for the specified compartment.
470
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
471
+ #
472
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
380
473
  #
381
474
  # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the
382
475
  # resources monitored by the metric that you are searching for. Use tenancyId to search in
383
476
  # the root compartment.
384
477
  #
478
+ # Example: `ocid1.compartment.oc1..exampleuniqueID`
479
+ #
385
480
  # @param [Hash] opts the optional parameters
386
481
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
387
482
  # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@@ -392,7 +487,6 @@ module OCI
392
487
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
393
488
  #
394
489
  # @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call.
395
- # 1 is the minimum, 1000 is the maximum.
396
490
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
397
491
  #
398
492
  # Default: 1000
@@ -487,11 +581,16 @@ module OCI
487
581
 
488
582
 
489
583
  # List the status of each alarm in the specified compartment.
584
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
585
+ #
586
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
490
587
  #
491
588
  # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the
492
589
  # resources monitored by the metric that you are searching for. Use tenancyId to search in
493
590
  # the root compartment.
494
591
  #
592
+ # Example: `ocid1.compartment.oc1..exampleuniqueID`
593
+ #
495
594
  # @param [Hash] opts the optional parameters
496
595
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
497
596
  # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@@ -508,7 +607,6 @@ module OCI
508
607
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
509
608
  #
510
609
  # @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call.
511
- # 1 is the minimum, 1000 is the maximum.
512
610
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
513
611
  #
514
612
  # Default: 1000
@@ -591,11 +689,16 @@ module OCI
591
689
 
592
690
  # Returns metric definitions that match the criteria specified in the request. Compartment OCID required.
593
691
  # For information about metrics, see [Metrics Overview](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#MetricsOverview).
692
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
693
+ #
694
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
594
695
  #
595
696
  # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the
596
697
  # resources monitored by the metric that you are searching for. Use tenancyId to search in
597
698
  # the root compartment.
598
699
  #
700
+ # Example: `ocid1.compartment.oc1..exampleuniqueID`
701
+ #
599
702
  # @param [OCI::Monitoring::Models::ListMetricsDetails] list_metrics_details The dimensions used to filter metrics.
600
703
  # @param [Hash] opts the optional parameters
601
704
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
@@ -607,7 +710,6 @@ module OCI
607
710
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
608
711
  #
609
712
  # @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call.
610
- # 1 is the minimum, 1000 is the maximum.
611
713
  # For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
612
714
  #
613
715
  # Default: 1000
@@ -673,6 +775,18 @@ module OCI
673
775
 
674
776
  # Publishes raw metric data points to the Monitoring service.
675
777
  # For more information about publishing metrics, see [Publishing Custom Metrics](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/publishingcustommetrics.htm).
778
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
779
+ #
780
+ # Per-call limits information follows.
781
+ #
782
+ # * Dimensions per metric group*. Maximum: 20. Minimum: 1.
783
+ # * Unique metric streams*. Maximum: 50.
784
+ # * Transactions Per Second (TPS) per-tenancy limit for this operation: 50.
785
+ #
786
+ # *A metric group is the combination of a given metric, metric namespace, and tenancy for the purpose of determining limits.
787
+ # A dimension is a qualifier provided in a metric definition.
788
+ # A metric stream is an individual set of aggregated data for a metric, typically specific to a resource.
789
+ # For more information about metric-related concepts, see [Monitoring Concepts](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#concepts).
676
790
  #
677
791
  # The endpoints for this operation differ from other Monitoring operations. Replace the string `telemetry` with `telemetry-ingestion` in the endpoint, as in the following example:
678
792
  #
@@ -733,12 +847,19 @@ module OCI
733
847
 
734
848
 
735
849
  # Removes any existing suppression for the specified alarm.
850
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
851
+ #
852
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
736
853
  #
737
854
  # @param [String] alarm_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
738
855
  #
739
856
  # @param [Hash] opts the optional parameters
740
857
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
741
858
  # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
859
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
860
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
861
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
862
+ #
742
863
  # @option opts [String] :opc_request_id Customer part of the request identifier token. If you need to contact Oracle about a particular
743
864
  # request, please provide the complete request ID.
744
865
  #
@@ -760,6 +881,7 @@ module OCI
760
881
  header_params = {}
761
882
  header_params[:accept] = 'application/json'
762
883
  header_params[:'content-type'] = 'application/json'
884
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
763
885
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
764
886
  # rubocop:enable Style/NegatedIf
765
887
 
@@ -790,11 +912,16 @@ module OCI
790
912
 
791
913
  # Returns aggregated data that match the criteria specified in the request. Compartment OCID required.
792
914
  # For information on metric queries, see [Building Metric Queries](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/buildingqueries.htm).
915
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
916
+ #
917
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 10.
793
918
  #
794
919
  # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the
795
920
  # resources monitored by the metric that you are searching for. Use tenancyId to search in
796
921
  # the root compartment.
797
922
  #
923
+ # Example: `ocid1.compartment.oc1..exampleuniqueID`
924
+ #
798
925
  # @param [OCI::Monitoring::Models::SummarizeMetricsDataDetails] summarize_metrics_data_details The dimensions used to filter for metrics.
799
926
  # @param [Hash] opts the optional parameters
800
927
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
@@ -858,6 +985,9 @@ module OCI
858
985
 
859
986
 
860
987
  # Updates the specified alarm.
988
+ # For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
989
+ #
990
+ # Transactions Per Second (TPS) per-tenancy limit for this operation: 1.
861
991
  #
862
992
  # @param [String] alarm_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
863
993
  #
@@ -865,6 +995,10 @@ module OCI
865
995
  # @param [Hash] opts the optional parameters
866
996
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
867
997
  # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
998
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
999
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1000
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1001
+ #
868
1002
  # @option opts [String] :opc_request_id Customer part of the request identifier token. If you need to contact Oracle about a particular
869
1003
  # request, please provide the complete request ID.
870
1004
  #
@@ -887,6 +1021,7 @@ module OCI
887
1021
  header_params = {}
888
1022
  header_params[:accept] = 'application/json'
889
1023
  header_params[:'content-type'] = 'application/json'
1024
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
890
1025
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
891
1026
  # rubocop:enable Style/NegatedIf
892
1027
 
@@ -13,11 +13,11 @@ module OCI
13
13
  POLICY_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
14
14
  ].freeze
15
15
 
16
- # **[Required]** The maximum retry duration in milliseconds.
16
+ # **[Required]** The maximum retry duration in milliseconds. Default value is `7200000` (2 hours).
17
17
  # @return [Integer]
18
18
  attr_accessor :max_retry_duration
19
19
 
20
- # **[Required]** The type of delivery policy. Default value: EXPONENTIAL.
20
+ # **[Required]** The type of delivery policy.
21
21
  #
22
22
  # @return [String]
23
23
  attr_reader :policy_type
@@ -0,0 +1,156 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
+ module OCI
7
+ # The configuration details for the move operation.
8
+ #
9
+ class Ons::Models::ChangeCompartmentDetails
10
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the specified topic
11
+ # or subscription to.
12
+ #
13
+ # @return [String]
14
+ attr_accessor :compartment_id
15
+
16
+ # Attribute mapping from ruby-style variable name to JSON key.
17
+ def self.attribute_map
18
+ {
19
+ # rubocop:disable Style/SymbolLiteral
20
+ 'compartment_id': :'compartmentId'
21
+ # rubocop:enable Style/SymbolLiteral
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.swagger_types
27
+ {
28
+ # rubocop:disable Style/SymbolLiteral
29
+ 'compartment_id': :'String'
30
+ # rubocop:enable Style/SymbolLiteral
31
+ }
32
+ end
33
+
34
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
35
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
36
+
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
48
+
49
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
50
+
51
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
52
+ end
53
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
54
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
55
+
56
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
57
+
58
+
59
+ # Checks equality by comparing each attribute.
60
+ # @param [Object] other the other object to be compared
61
+ def ==(other)
62
+ return true if equal?(other)
63
+
64
+ self.class == other.class &&
65
+ compartment_id == other.compartment_id
66
+ end
67
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
68
+
69
+ # @see the `==` method
70
+ # @param [Object] other the other object to be compared
71
+ def eql?(other)
72
+ self == other
73
+ end
74
+
75
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
76
+
77
+
78
+ # Calculates hash code according to all attributes.
79
+ # @return [Fixnum] Hash code
80
+ def hash
81
+ [compartment_id].hash
82
+ end
83
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
84
+
85
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
86
+
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+
94
+ self.class.swagger_types.each_pair do |key, type|
95
+ if type =~ /^Array<(.*)>/i
96
+ # check to ensure the input is an array given that the the attribute
97
+ # is documented as an array but the input is not
98
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
99
+ public_method("#{key}=").call(
100
+ attributes[self.class.attribute_map[key]]
101
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
102
+ )
103
+ end
104
+ elsif !attributes[self.class.attribute_map[key]].nil?
105
+ public_method("#{key}=").call(
106
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
107
+ )
108
+ end
109
+ # or else data not found in attributes(hash), not an issue as the data can be optional
110
+ end
111
+
112
+ self
113
+ end
114
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
115
+
116
+ # Returns the string representation of the object
117
+ # @return [String] String presentation of the object
118
+ def to_s
119
+ to_hash.to_s
120
+ end
121
+
122
+ # Returns the object in the form of hash
123
+ # @return [Hash] Returns the object in the form of hash
124
+ def to_hash
125
+ hash = {}
126
+ self.class.attribute_map.each_pair do |attr, param|
127
+ value = public_method(attr).call
128
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
129
+
130
+ hash[param] = _to_hash(value)
131
+ end
132
+ hash
133
+ end
134
+
135
+ private
136
+
137
+ # Outputs non-array value in the form of hash
138
+ # For object, use to_hash. Otherwise, just return the value
139
+ # @param [Object] value Any valid value
140
+ # @return [Hash] Returns the value in the form of hash
141
+ def _to_hash(value)
142
+ if value.is_a?(Array)
143
+ value.compact.map { |v| _to_hash(v) }
144
+ elsif value.is_a?(Hash)
145
+ {}.tap do |hash|
146
+ value.each { |k, v| hash[k] = _to_hash(v) }
147
+ end
148
+ elsif value.respond_to? :to_hash
149
+ value.to_hash
150
+ else
151
+ value
152
+ end
153
+ end
154
+ end
155
+ end
156
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength