oci 2.5.1 → 2.5.2

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 (378) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -2
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/autoscaling/auto_scaling_client.rb +5 -5
  5. data/lib/oci/autoscaling/models/auto_scaling_configuration.rb +2 -2
  6. data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +2 -2
  7. data/lib/oci/autoscaling/models/update_auto_scaling_configuration_details.rb +2 -2
  8. data/lib/oci/budget/budget.rb +33 -0
  9. data/lib/oci/budget/budget_client.rb +767 -0
  10. data/lib/oci/budget/budget_client_composite_operations.rb +224 -0
  11. data/lib/oci/budget/models/alert_rule.rb +398 -0
  12. data/lib/oci/budget/models/alert_rule_summary.rb +396 -0
  13. data/lib/oci/budget/models/alert_type.rb +10 -0
  14. data/lib/oci/budget/models/budget.rb +413 -0
  15. data/lib/oci/budget/models/budget_summary.rb +413 -0
  16. data/lib/oci/budget/models/create_alert_rule_details.rb +288 -0
  17. data/lib/oci/budget/models/create_budget_details.rb +267 -0
  18. data/lib/oci/budget/models/lifecycle_state.rb +10 -0
  19. data/lib/oci/budget/models/reset_period.rb +9 -0
  20. data/lib/oci/budget/models/sort_by.rb +10 -0
  21. data/lib/oci/budget/models/sort_order.rb +10 -0
  22. data/lib/oci/budget/models/threshold_type.rb +10 -0
  23. data/lib/oci/budget/models/update_alert_rule_details.rb +288 -0
  24. data/lib/oci/budget/models/update_budget_details.rb +239 -0
  25. data/lib/oci/budget/util.rb +2 -0
  26. data/lib/oci/core/blockstorage_client.rb +35 -35
  27. data/lib/oci/core/compute_client.rb +41 -41
  28. data/lib/oci/core/compute_management_client.rb +6 -6
  29. data/lib/oci/core/models/app_catalog_listing_resource_version.rb +1 -1
  30. data/lib/oci/core/models/attach_vnic_details.rb +1 -1
  31. data/lib/oci/core/models/boot_volume.rb +4 -4
  32. data/lib/oci/core/models/boot_volume_backup.rb +4 -4
  33. data/lib/oci/core/models/capture_console_history_details.rb +2 -2
  34. data/lib/oci/core/models/console_history.rb +2 -2
  35. data/lib/oci/core/models/cpe.rb +4 -4
  36. data/lib/oci/core/models/create_boot_volume_backup_details.rb +2 -2
  37. data/lib/oci/core/models/create_boot_volume_details.rb +2 -2
  38. data/lib/oci/core/models/create_cpe_details.rb +2 -2
  39. data/lib/oci/core/models/create_dhcp_details.rb +2 -2
  40. data/lib/oci/core/models/create_drg_attachment_details.rb +1 -1
  41. data/lib/oci/core/models/create_drg_details.rb +2 -2
  42. data/lib/oci/core/models/create_image_details.rb +2 -2
  43. data/lib/oci/core/models/create_instance_configuration_details.rb +2 -2
  44. data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
  45. data/lib/oci/core/models/create_instance_pool_details.rb +2 -2
  46. data/lib/oci/core/models/create_internet_gateway_details.rb +2 -2
  47. data/lib/oci/core/models/create_ip_sec_connection_details.rb +2 -2
  48. data/lib/oci/core/models/create_local_peering_gateway_details.rb +3 -3
  49. data/lib/oci/core/models/create_nat_gateway_details.rb +4 -4
  50. data/lib/oci/core/models/create_private_ip_details.rb +3 -3
  51. data/lib/oci/core/models/create_public_ip_details.rb +3 -3
  52. data/lib/oci/core/models/create_route_table_details.rb +2 -2
  53. data/lib/oci/core/models/create_security_list_details.rb +2 -2
  54. data/lib/oci/core/models/create_service_gateway_details.rb +4 -4
  55. data/lib/oci/core/models/create_subnet_details.rb +3 -3
  56. data/lib/oci/core/models/create_vcn_details.rb +3 -3
  57. data/lib/oci/core/models/create_vnic_details.rb +7 -7
  58. data/lib/oci/core/models/create_volume_backup_details.rb +2 -2
  59. data/lib/oci/core/models/create_volume_details.rb +2 -2
  60. data/lib/oci/core/models/create_volume_group_backup_details.rb +2 -2
  61. data/lib/oci/core/models/create_volume_group_details.rb +2 -2
  62. data/lib/oci/core/models/cross_connect.rb +2 -2
  63. data/lib/oci/core/models/cross_connect_group.rb +2 -2
  64. data/lib/oci/core/models/dhcp_dns_option.rb +2 -2
  65. data/lib/oci/core/models/dhcp_option.rb +2 -2
  66. data/lib/oci/core/models/dhcp_options.rb +5 -5
  67. data/lib/oci/core/models/dhcp_search_domain_option.rb +1 -1
  68. data/lib/oci/core/models/drg.rb +4 -4
  69. data/lib/oci/core/models/drg_attachment.rb +2 -2
  70. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +2 -2
  71. data/lib/oci/core/models/fast_connect_provider_service.rb +1 -1
  72. data/lib/oci/core/models/image.rb +4 -4
  73. data/lib/oci/core/models/instance.rb +5 -5
  74. data/lib/oci/core/models/instance_configuration.rb +2 -2
  75. data/lib/oci/core/models/instance_configuration_attach_vnic_details.rb +1 -1
  76. data/lib/oci/core/models/instance_configuration_create_volume_details.rb +2 -2
  77. data/lib/oci/core/models/instance_configuration_launch_instance_details.rb +3 -3
  78. data/lib/oci/core/models/instance_console_connection.rb +3 -3
  79. data/lib/oci/core/models/instance_pool.rb +2 -2
  80. data/lib/oci/core/models/internet_gateway.rb +4 -4
  81. data/lib/oci/core/models/ip_sec_connection.rb +4 -4
  82. data/lib/oci/core/models/launch_instance_details.rb +3 -3
  83. data/lib/oci/core/models/local_peering_gateway.rb +5 -5
  84. data/lib/oci/core/models/nat_gateway.rb +7 -7
  85. data/lib/oci/core/models/peer_region_for_remote_peering.rb +1 -1
  86. data/lib/oci/core/models/private_ip.rb +5 -5
  87. data/lib/oci/core/models/public_ip.rb +4 -4
  88. data/lib/oci/core/models/remote_peering_connection.rb +2 -2
  89. data/lib/oci/core/models/route_rule.rb +1 -1
  90. data/lib/oci/core/models/route_table.rb +4 -4
  91. data/lib/oci/core/models/security_list.rb +4 -4
  92. data/lib/oci/core/models/service.rb +1 -1
  93. data/lib/oci/core/models/service_gateway.rb +7 -7
  94. data/lib/oci/core/models/service_id_request_details.rb +1 -1
  95. data/lib/oci/core/models/service_id_response_details.rb +1 -1
  96. data/lib/oci/core/models/shape.rb +1 -1
  97. data/lib/oci/core/models/subnet.rb +7 -7
  98. data/lib/oci/core/models/update_boot_volume_backup_details.rb +2 -2
  99. data/lib/oci/core/models/update_boot_volume_details.rb +2 -2
  100. data/lib/oci/core/models/update_console_history_details.rb +2 -2
  101. data/lib/oci/core/models/update_cpe_details.rb +2 -2
  102. data/lib/oci/core/models/update_dhcp_details.rb +2 -2
  103. data/lib/oci/core/models/update_drg_attachment_details.rb +1 -1
  104. data/lib/oci/core/models/update_drg_details.rb +2 -2
  105. data/lib/oci/core/models/update_image_details.rb +2 -2
  106. data/lib/oci/core/models/update_instance_configuration_details.rb +2 -2
  107. data/lib/oci/core/models/update_instance_details.rb +2 -2
  108. data/lib/oci/core/models/update_instance_pool_details.rb +2 -2
  109. data/lib/oci/core/models/update_internet_gateway_details.rb +2 -2
  110. data/lib/oci/core/models/update_ip_sec_connection_details.rb +2 -2
  111. data/lib/oci/core/models/update_local_peering_gateway_details.rb +3 -3
  112. data/lib/oci/core/models/update_nat_gateway_details.rb +2 -2
  113. data/lib/oci/core/models/update_private_ip_details.rb +3 -3
  114. data/lib/oci/core/models/update_public_ip_details.rb +2 -2
  115. data/lib/oci/core/models/update_route_table_details.rb +2 -2
  116. data/lib/oci/core/models/update_security_list_details.rb +2 -2
  117. data/lib/oci/core/models/update_service_gateway_details.rb +2 -2
  118. data/lib/oci/core/models/update_subnet_details.rb +2 -2
  119. data/lib/oci/core/models/update_vcn_details.rb +2 -2
  120. data/lib/oci/core/models/update_vnic_details.rb +4 -4
  121. data/lib/oci/core/models/update_volume_backup_details.rb +2 -2
  122. data/lib/oci/core/models/update_volume_details.rb +2 -2
  123. data/lib/oci/core/models/update_volume_group_backup_details.rb +2 -2
  124. data/lib/oci/core/models/update_volume_group_details.rb +2 -2
  125. data/lib/oci/core/models/vcn.rb +6 -6
  126. data/lib/oci/core/models/virtual_circuit.rb +4 -4
  127. data/lib/oci/core/models/virtual_circuit_public_prefix.rb +1 -1
  128. data/lib/oci/core/models/vnic.rb +7 -7
  129. data/lib/oci/core/models/vnic_attachment.rb +2 -2
  130. data/lib/oci/core/models/volume.rb +4 -4
  131. data/lib/oci/core/models/volume_attachment.rb +1 -1
  132. data/lib/oci/core/models/volume_backup.rb +4 -4
  133. data/lib/oci/core/models/volume_group.rb +3 -3
  134. data/lib/oci/core/models/volume_group_backup.rb +4 -4
  135. data/lib/oci/core/virtual_network_client.rb +121 -121
  136. data/lib/oci/core/virtual_network_client_composite_operations.rb +6 -6
  137. data/lib/oci/database/database.rb +4 -0
  138. data/lib/oci/database/database_client.rb +202 -78
  139. data/lib/oci/database/database_client_composite_operations.rb +65 -25
  140. data/lib/oci/database/models/autonomous_data_warehouse.rb +4 -4
  141. data/lib/oci/database/models/autonomous_data_warehouse_backup.rb +3 -3
  142. data/lib/oci/database/models/autonomous_data_warehouse_backup_summary.rb +4 -4
  143. data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +4 -4
  144. data/lib/oci/database/models/autonomous_database.rb +43 -8
  145. data/lib/oci/database/models/autonomous_database_backup.rb +3 -3
  146. data/lib/oci/database/models/autonomous_database_backup_summary.rb +4 -4
  147. data/lib/oci/database/models/autonomous_database_summary.rb +43 -8
  148. data/lib/oci/database/models/backup.rb +3 -3
  149. data/lib/oci/database/models/backup_summary.rb +4 -4
  150. data/lib/oci/database/models/create_autonomous_data_warehouse_backup_details.rb +1 -1
  151. data/lib/oci/database/models/create_autonomous_data_warehouse_details.rb +3 -3
  152. data/lib/oci/database/models/create_autonomous_database_backup_details.rb +1 -1
  153. data/lib/oci/database/models/create_autonomous_database_details.rb +33 -4
  154. data/lib/oci/database/models/create_backup_details.rb +1 -1
  155. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +1 -1
  156. data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +1 -1
  157. data/lib/oci/database/models/create_database_details.rb +2 -2
  158. data/lib/oci/database/models/create_database_from_backup_details.rb +1 -1
  159. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
  160. data/lib/oci/database/models/create_external_backup_job_details.rb +1 -1
  161. data/lib/oci/database/models/data_guard_association.rb +6 -6
  162. data/lib/oci/database/models/data_guard_association_summary.rb +9 -9
  163. data/lib/oci/database/models/database.rb +5 -5
  164. data/lib/oci/database/models/database_summary.rb +7 -7
  165. data/lib/oci/database/models/db_backup_config.rb +1 -1
  166. data/lib/oci/database/models/db_home.rb +4 -4
  167. data/lib/oci/database/models/db_home_summary.rb +6 -6
  168. data/lib/oci/database/models/db_iorm_config.rb +181 -0
  169. data/lib/oci/database/models/db_iorm_config_update_detail.rb +166 -0
  170. data/lib/oci/database/models/db_node.rb +4 -4
  171. data/lib/oci/database/models/db_node_summary.rb +5 -5
  172. data/lib/oci/database/models/db_system.rb +41 -11
  173. data/lib/oci/database/models/db_system_shape_summary.rb +2 -2
  174. data/lib/oci/database/models/db_system_summary.rb +30 -16
  175. data/lib/oci/database/models/db_version_summary.rb +1 -1
  176. data/lib/oci/database/models/exadata_iorm_config.rb +247 -0
  177. data/lib/oci/database/models/exadata_iorm_config_update_details.rb +186 -0
  178. data/lib/oci/database/models/external_backup_job.rb +2 -2
  179. data/lib/oci/database/models/launch_db_system_base.rb +24 -10
  180. data/lib/oci/database/models/launch_db_system_details.rb +5 -1
  181. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +5 -1
  182. data/lib/oci/database/models/patch.rb +1 -1
  183. data/lib/oci/database/models/patch_details.rb +1 -1
  184. data/lib/oci/database/models/patch_history_entry.rb +2 -2
  185. data/lib/oci/database/models/patch_history_entry_summary.rb +2 -2
  186. data/lib/oci/database/models/patch_summary.rb +2 -2
  187. data/lib/oci/database/models/update_autonomous_data_warehouse_details.rb +2 -2
  188. data/lib/oci/database/models/update_autonomous_database_details.rb +2 -2
  189. data/lib/oci/database/models/update_database_details.rb +2 -2
  190. data/lib/oci/database/models/update_db_system_details.rb +2 -2
  191. data/lib/oci/dns/dns_client.rb +1 -1
  192. data/lib/oci/dns/models/create_steering_policy_details.rb +1 -1
  193. data/lib/oci/dns/models/create_zone_details.rb +1 -1
  194. data/lib/oci/dns/models/record.rb +1 -1
  195. data/lib/oci/dns/models/record_details.rb +1 -1
  196. data/lib/oci/dns/models/record_operation.rb +1 -1
  197. data/lib/oci/dns/models/steering_policy.rb +1 -1
  198. data/lib/oci/dns/models/steering_policy_summary.rb +1 -1
  199. data/lib/oci/dns/models/update_steering_policy_details.rb +1 -1
  200. data/lib/oci/dns/models/update_zone_details.rb +1 -1
  201. data/lib/oci/dns/models/zone.rb +1 -1
  202. data/lib/oci/dns/models/zone_summary.rb +1 -1
  203. data/lib/oci/email/email_client.rb +3 -3
  204. data/lib/oci/email/models/create_sender_details.rb +2 -2
  205. data/lib/oci/email/models/sender.rb +2 -2
  206. data/lib/oci/email/models/sender_summary.rb +2 -2
  207. data/lib/oci/email/models/update_sender_details.rb +2 -2
  208. data/lib/oci/file_storage/file_storage_client.rb +14 -14
  209. data/lib/oci/file_storage/models/create_file_system_details.rb +2 -2
  210. data/lib/oci/file_storage/models/create_mount_target_details.rb +3 -3
  211. data/lib/oci/file_storage/models/create_snapshot_details.rb +2 -2
  212. data/lib/oci/file_storage/models/export.rb +1 -1
  213. data/lib/oci/file_storage/models/file_system.rb +3 -3
  214. data/lib/oci/file_storage/models/mount_target.rb +2 -2
  215. data/lib/oci/file_storage/models/snapshot.rb +2 -2
  216. data/lib/oci/file_storage/models/update_file_system_details.rb +2 -2
  217. data/lib/oci/file_storage/models/update_mount_target_details.rb +2 -2
  218. data/lib/oci/file_storage/models/update_snapshot_details.rb +2 -2
  219. data/lib/oci/healthchecks/models/create_http_monitor_details.rb +2 -2
  220. data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +2 -2
  221. data/lib/oci/healthchecks/models/http_monitor.rb +2 -2
  222. data/lib/oci/healthchecks/models/http_monitor_summary.rb +2 -2
  223. data/lib/oci/healthchecks/models/ping_monitor.rb +2 -2
  224. data/lib/oci/healthchecks/models/ping_monitor_summary.rb +2 -2
  225. data/lib/oci/healthchecks/models/update_http_monitor_details.rb +2 -2
  226. data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +2 -2
  227. data/lib/oci/identity/identity.rb +7 -0
  228. data/lib/oci/identity/identity_client.rb +461 -36
  229. data/lib/oci/identity/identity_client_composite_operations.rb +119 -0
  230. data/lib/oci/identity/models/api_key.rb +2 -2
  231. data/lib/oci/identity/models/auth_token.rb +1 -1
  232. data/lib/oci/identity/models/authentication_policy.rb +168 -0
  233. data/lib/oci/identity/models/availability_domain.rb +1 -1
  234. data/lib/oci/identity/models/compartment.rb +5 -5
  235. data/lib/oci/identity/models/create_compartment_details.rb +2 -2
  236. data/lib/oci/identity/models/create_dynamic_group_details.rb +1 -1
  237. data/lib/oci/identity/models/create_group_details.rb +2 -2
  238. data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
  239. data/lib/oci/identity/models/create_policy_details.rb +4 -4
  240. data/lib/oci/identity/models/create_tag_default_details.rb +180 -0
  241. data/lib/oci/identity/models/create_tag_details.rb +2 -2
  242. data/lib/oci/identity/models/create_tag_namespace_details.rb +2 -2
  243. data/lib/oci/identity/models/create_user_details.rb +13 -3
  244. data/lib/oci/identity/models/customer_secret_key.rb +2 -2
  245. data/lib/oci/identity/models/dynamic_group.rb +2 -2
  246. data/lib/oci/identity/models/group.rb +5 -5
  247. data/lib/oci/identity/models/identity_provider.rb +4 -4
  248. data/lib/oci/identity/models/idp_group_mapping.rb +1 -1
  249. data/lib/oci/identity/models/mfa_totp_device.rb +20 -9
  250. data/lib/oci/identity/models/mfa_totp_device_summary.rb +7 -1
  251. data/lib/oci/identity/models/password_policy.rb +234 -0
  252. data/lib/oci/identity/models/policy.rb +4 -4
  253. data/lib/oci/identity/models/region.rb +2 -2
  254. data/lib/oci/identity/models/region_subscription.rb +2 -2
  255. data/lib/oci/identity/models/saml2_identity_provider.rb +1 -1
  256. data/lib/oci/identity/models/smtp_credential.rb +1 -1
  257. data/lib/oci/identity/models/smtp_credential_summary.rb +1 -1
  258. data/lib/oci/identity/models/swift_password.rb +1 -1
  259. data/lib/oci/identity/models/tag.rb +4 -4
  260. data/lib/oci/identity/models/tag_default.rb +280 -0
  261. data/lib/oci/identity/models/tag_default_summary.rb +274 -0
  262. data/lib/oci/identity/models/tag_namespace.rb +4 -4
  263. data/lib/oci/identity/models/tag_namespace_summary.rb +3 -3
  264. data/lib/oci/identity/models/tag_summary.rb +3 -3
  265. data/lib/oci/identity/models/tenancy.rb +4 -4
  266. data/lib/oci/identity/models/ui_password.rb +1 -1
  267. data/lib/oci/identity/models/update_authentication_policy_details.rb +154 -0
  268. data/lib/oci/identity/models/update_compartment_details.rb +2 -2
  269. data/lib/oci/identity/models/update_dynamic_group_details.rb +1 -1
  270. data/lib/oci/identity/models/update_group_details.rb +2 -2
  271. data/lib/oci/identity/models/update_identity_provider_details.rb +2 -2
  272. data/lib/oci/identity/models/update_policy_details.rb +4 -4
  273. data/lib/oci/identity/models/update_tag_default_details.rb +150 -0
  274. data/lib/oci/identity/models/update_tag_details.rb +3 -3
  275. data/lib/oci/identity/models/update_tag_namespace_details.rb +3 -3
  276. data/lib/oci/identity/models/update_user_details.rb +13 -3
  277. data/lib/oci/identity/models/user.rb +19 -7
  278. data/lib/oci/load_balancer/load_balancer_client.rb +64 -64
  279. data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +23 -23
  280. data/lib/oci/load_balancer/models/backend.rb +2 -2
  281. data/lib/oci/load_balancer/models/backend_details.rb +1 -1
  282. data/lib/oci/load_balancer/models/backend_set.rb +1 -1
  283. data/lib/oci/load_balancer/models/backend_set_details.rb +1 -1
  284. data/lib/oci/load_balancer/models/certificate.rb +1 -1
  285. data/lib/oci/load_balancer/models/certificate_details.rb +1 -1
  286. data/lib/oci/load_balancer/models/connection_configuration.rb +1 -1
  287. data/lib/oci/load_balancer/models/create_backend_details.rb +2 -2
  288. data/lib/oci/load_balancer/models/create_backend_set_details.rb +1 -1
  289. data/lib/oci/load_balancer/models/create_certificate_details.rb +1 -1
  290. data/lib/oci/load_balancer/models/create_hostname_details.rb +1 -1
  291. data/lib/oci/load_balancer/models/create_listener_details.rb +1 -1
  292. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +6 -6
  293. data/lib/oci/load_balancer/models/health_check_result.rb +1 -1
  294. data/lib/oci/load_balancer/models/health_checker.rb +1 -1
  295. data/lib/oci/load_balancer/models/hostname.rb +1 -1
  296. data/lib/oci/load_balancer/models/hostname_details.rb +1 -1
  297. data/lib/oci/load_balancer/models/listener.rb +1 -1
  298. data/lib/oci/load_balancer/models/load_balancer.rb +11 -11
  299. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +1 -1
  300. data/lib/oci/load_balancer/models/load_balancer_policy.rb +1 -1
  301. data/lib/oci/load_balancer/models/path_match_type.rb +1 -1
  302. data/lib/oci/load_balancer/models/path_route_set.rb +1 -1
  303. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +1 -1
  304. data/lib/oci/load_balancer/models/update_backend_details.rb +1 -1
  305. data/lib/oci/load_balancer/models/update_backend_set_details.rb +1 -1
  306. data/lib/oci/load_balancer/models/update_hostname_details.rb +2 -2
  307. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +2 -2
  308. data/lib/oci/load_balancer/models/work_request.rb +3 -3
  309. data/lib/oci/monitoring/models/alarm.rb +10 -10
  310. data/lib/oci/monitoring/models/alarm_history_collection.rb +1 -1
  311. data/lib/oci/monitoring/models/alarm_status_summary.rb +5 -5
  312. data/lib/oci/monitoring/models/alarm_summary.rb +10 -10
  313. data/lib/oci/monitoring/models/create_alarm_details.rb +5 -5
  314. data/lib/oci/monitoring/models/metric.rb +2 -2
  315. data/lib/oci/monitoring/models/metric_data.rb +2 -2
  316. data/lib/oci/monitoring/models/metric_data_details.rb +1 -1
  317. data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +2 -2
  318. data/lib/oci/monitoring/models/suppression.rb +1 -1
  319. data/lib/oci/monitoring/models/update_alarm_details.rb +5 -5
  320. data/lib/oci/monitoring/monitoring_client.rb +20 -20
  321. data/lib/oci/monitoring/monitoring_client_composite_operations.rb +2 -2
  322. data/lib/oci/object_storage/models/bucket.rb +4 -4
  323. data/lib/oci/object_storage/models/bucket_summary.rb +3 -3
  324. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +1 -1
  325. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +1 -1
  326. data/lib/oci/object_storage/models/copy_object_details.rb +1 -1
  327. data/lib/oci/object_storage/models/create_bucket_details.rb +3 -3
  328. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +1 -1
  329. data/lib/oci/object_storage/models/list_objects.rb +1 -1
  330. data/lib/oci/object_storage/models/multipart_upload.rb +2 -2
  331. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +1 -1
  332. data/lib/oci/object_storage/models/object_lifecycle_policy.rb +1 -1
  333. data/lib/oci/object_storage/models/object_lifecycle_rule.rb +2 -2
  334. data/lib/oci/object_storage/models/object_summary.rb +1 -1
  335. data/lib/oci/object_storage/models/preauthenticated_request.rb +2 -2
  336. data/lib/oci/object_storage/models/rename_object_details.rb +1 -1
  337. data/lib/oci/object_storage/models/update_bucket_details.rb +3 -3
  338. data/lib/oci/object_storage/object_storage_client.rb +3 -3
  339. data/lib/oci/ons/models/confirmation_result.rb +2 -2
  340. data/lib/oci/ons/models/create_subscription_details.rb +4 -4
  341. data/lib/oci/ons/models/create_topic_details.rb +3 -3
  342. data/lib/oci/ons/models/notification_topic.rb +4 -4
  343. data/lib/oci/ons/models/notification_topic_summary.rb +4 -4
  344. data/lib/oci/ons/models/subscription.rb +3 -3
  345. data/lib/oci/ons/models/subscription_summary.rb +4 -4
  346. data/lib/oci/ons/models/topic_attributes_details.rb +2 -2
  347. data/lib/oci/ons/models/update_subscription_details.rb +2 -2
  348. data/lib/oci/ons/notification_control_plane_client.rb +9 -9
  349. data/lib/oci/ons/notification_data_plane_client.rb +10 -10
  350. data/lib/oci/ons/notification_data_plane_client_composite_operations.rb +1 -1
  351. data/lib/oci/regions.rb +1 -0
  352. data/lib/oci/resource_manager/models/create_job_details.rb +2 -2
  353. data/lib/oci/resource_manager/models/create_stack_details.rb +2 -2
  354. data/lib/oci/resource_manager/models/job.rb +2 -2
  355. data/lib/oci/resource_manager/models/job_summary.rb +2 -2
  356. data/lib/oci/resource_manager/models/stack.rb +2 -2
  357. data/lib/oci/resource_manager/models/stack_summary.rb +2 -2
  358. data/lib/oci/resource_manager/models/update_job_details.rb +2 -2
  359. data/lib/oci/resource_manager/models/update_stack_details.rb +2 -2
  360. data/lib/oci/resource_manager/resource_manager_client.rb +6 -6
  361. data/lib/oci/streaming/models/create_stream_details.rb +2 -2
  362. data/lib/oci/streaming/models/stream.rb +2 -2
  363. data/lib/oci/streaming/models/stream_summary.rb +2 -2
  364. data/lib/oci/streaming/models/update_stream_details.rb +2 -2
  365. data/lib/oci/version.rb +1 -1
  366. data/lib/oci/waas/models/certificate.rb +2 -2
  367. data/lib/oci/waas/models/certificate_summary.rb +2 -2
  368. data/lib/oci/waas/models/create_certificate_details.rb +1 -1
  369. data/lib/oci/waas/models/create_waas_policy_details.rb +1 -1
  370. data/lib/oci/waas/models/update_waas_policy_details.rb +1 -1
  371. data/lib/oci/waas/models/waas_policy.rb +2 -2
  372. data/lib/oci/waas/models/waas_policy_summary.rb +2 -2
  373. data/lib/oci/waas/models/work_request.rb +3 -3
  374. data/lib/oci/waas/models/work_request_resource.rb +1 -1
  375. data/lib/oci/waas/models/work_request_summary.rb +2 -2
  376. data/lib/oci/waas/waas_client.rb +53 -53
  377. data/lib/oci/waas/waas_client_composite_operations.rb +18 -18
  378. metadata +31 -2
@@ -0,0 +1,224 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
4
+ module OCI
5
+ # This class provides a wrapper around {OCI::Budget::BudgetClient} and offers convenience methods
6
+ # for operations that would otherwise need to be chained together. For example, instead of performing an action
7
+ # on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource
8
+ # to enter a given state, you can call a single method in this class to accomplish the same functionality
9
+ class Budget::BudgetClientCompositeOperations
10
+ # The {OCI::Budget::BudgetClient} used to communicate with the service_client
11
+ #
12
+ # @return [OCI::Budget::BudgetClient]
13
+ attr_reader :service_client
14
+
15
+ # Initializes a new BudgetClientCompositeOperations
16
+ #
17
+ # @param [OCI::Budget::BudgetClient] service_client The client used to communicate with the service.
18
+ # Defaults to a new service client created via {OCI::Budget::BudgetClient#initialize} with no arguments
19
+ def initialize(service_client = OCI::Budget::BudgetClient.new)
20
+ @service_client = service_client
21
+ end
22
+
23
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
24
+ # rubocop:disable Layout/EmptyLines
25
+
26
+
27
+ # Calls {OCI::Budget::BudgetClient#create_alert_rule} and then waits for the {OCI::Budget::Models::AlertRule} acted upon
28
+ # to enter the given state(s).
29
+ #
30
+ # @param [String] budget_id The unique Budget OCID
31
+ # @param [OCI::Budget::Models::CreateAlertRuleDetails] create_alert_rule_details Details for the new Alert Rule.
32
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Budget::Models::AlertRule#lifecycle_state}
33
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Budget::BudgetClient#create_alert_rule}
34
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
35
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
36
+ # * max_wait_seconds The maximum time to wait, in seconds
37
+ #
38
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Budget::Models::AlertRule}
39
+ def create_alert_rule_and_wait_for_state(budget_id, create_alert_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
40
+ operation_result = @service_client.create_alert_rule(budget_id, create_alert_rule_details, base_operation_opts)
41
+
42
+ return operation_result if wait_for_states.empty?
43
+
44
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
45
+ wait_for_resource_id = operation_result.data.id
46
+
47
+ begin
48
+ waiter_result = @service_client.get_alert_rule(wait_for_resource_id).wait_until(
49
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
50
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
51
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
52
+ )
53
+ result_to_return = waiter_result
54
+
55
+ return result_to_return
56
+ rescue StandardError
57
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
58
+ end
59
+ end
60
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
61
+ # rubocop:enable Layout/EmptyLines
62
+
63
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
64
+ # rubocop:disable Layout/EmptyLines
65
+
66
+
67
+ # Calls {OCI::Budget::BudgetClient#create_budget} and then waits for the {OCI::Budget::Models::Budget} acted upon
68
+ # to enter the given state(s).
69
+ #
70
+ # @param [OCI::Budget::Models::CreateBudgetDetails] create_budget_details Details for the new Budget.
71
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Budget::Models::Budget#lifecycle_state}
72
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Budget::BudgetClient#create_budget}
73
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
74
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
75
+ # * max_wait_seconds The maximum time to wait, in seconds
76
+ #
77
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Budget::Models::Budget}
78
+ def create_budget_and_wait_for_state(create_budget_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
79
+ operation_result = @service_client.create_budget(create_budget_details, base_operation_opts)
80
+
81
+ return operation_result if wait_for_states.empty?
82
+
83
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
84
+ wait_for_resource_id = operation_result.data.id
85
+
86
+ begin
87
+ waiter_result = @service_client.get_budget(wait_for_resource_id).wait_until(
88
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
89
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
90
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
91
+ )
92
+ result_to_return = waiter_result
93
+
94
+ return result_to_return
95
+ rescue StandardError
96
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
97
+ end
98
+ end
99
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
100
+ # rubocop:enable Layout/EmptyLines
101
+
102
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
103
+ # rubocop:disable Layout/EmptyLines
104
+
105
+
106
+ # Calls {OCI::Budget::BudgetClient#delete_budget} and then waits for the {OCI::Budget::Models::Budget} acted upon
107
+ # to enter the given state(s).
108
+ #
109
+ # @param [String] budget_id The unique Budget OCID
110
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Budget::Models::Budget#lifecycle_state}
111
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Budget::BudgetClient#delete_budget}
112
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
113
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
114
+ # * max_wait_seconds The maximum time to wait, in seconds
115
+ #
116
+ # @return [OCI::Response] A {OCI::Response} object with data of type nil
117
+ def delete_budget_and_wait_for_state(budget_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
118
+ initial_get_result = @service_client.get_budget(budget_id)
119
+ operation_result = @service_client.delete_budget(budget_id, base_operation_opts)
120
+
121
+ return operation_result if wait_for_states.empty?
122
+
123
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
124
+
125
+ begin
126
+ waiter_result = initial_get_result.wait_until(
127
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
128
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
129
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200,
130
+ succeed_on_not_found: true
131
+ )
132
+ result_to_return = waiter_result
133
+
134
+ return result_to_return
135
+ rescue StandardError
136
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
137
+ end
138
+ end
139
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
140
+ # rubocop:enable Layout/EmptyLines
141
+
142
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
143
+ # rubocop:disable Layout/EmptyLines
144
+
145
+
146
+ # Calls {OCI::Budget::BudgetClient#update_alert_rule} and then waits for the {OCI::Budget::Models::AlertRule} acted upon
147
+ # to enter the given state(s).
148
+ #
149
+ # @param [String] budget_id The unique Budget OCID
150
+ # @param [String] alert_rule_id The unique Alert Rule OCID
151
+ # @param [OCI::Budget::Models::UpdateAlertRuleDetails] update_alert_rule_details The information to be updated.
152
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Budget::Models::AlertRule#lifecycle_state}
153
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Budget::BudgetClient#update_alert_rule}
154
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
155
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
156
+ # * max_wait_seconds The maximum time to wait, in seconds
157
+ #
158
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Budget::Models::AlertRule}
159
+ def update_alert_rule_and_wait_for_state(budget_id, alert_rule_id, update_alert_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
160
+ operation_result = @service_client.update_alert_rule(budget_id, alert_rule_id, update_alert_rule_details, base_operation_opts)
161
+
162
+ return operation_result if wait_for_states.empty?
163
+
164
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
165
+ wait_for_resource_id = operation_result.data.id
166
+
167
+ begin
168
+ waiter_result = @service_client.get_alert_rule(wait_for_resource_id).wait_until(
169
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
170
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
171
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
172
+ )
173
+ result_to_return = waiter_result
174
+
175
+ return result_to_return
176
+ rescue StandardError
177
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
178
+ end
179
+ end
180
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
181
+ # rubocop:enable Layout/EmptyLines
182
+
183
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
184
+ # rubocop:disable Layout/EmptyLines
185
+
186
+
187
+ # Calls {OCI::Budget::BudgetClient#update_budget} and then waits for the {OCI::Budget::Models::Budget} acted upon
188
+ # to enter the given state(s).
189
+ #
190
+ # @param [String] budget_id The unique Budget OCID
191
+ # @param [OCI::Budget::Models::UpdateBudgetDetails] update_budget_details The information to be updated.
192
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Budget::Models::Budget#lifecycle_state}
193
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Budget::BudgetClient#update_budget}
194
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
195
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
196
+ # * max_wait_seconds The maximum time to wait, in seconds
197
+ #
198
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Budget::Models::Budget}
199
+ def update_budget_and_wait_for_state(budget_id, update_budget_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
200
+ operation_result = @service_client.update_budget(budget_id, update_budget_details, base_operation_opts)
201
+
202
+ return operation_result if wait_for_states.empty?
203
+
204
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
205
+ wait_for_resource_id = operation_result.data.id
206
+
207
+ begin
208
+ waiter_result = @service_client.get_budget(wait_for_resource_id).wait_until(
209
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
210
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
211
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
212
+ )
213
+ result_to_return = waiter_result
214
+
215
+ return result_to_return
216
+ rescue StandardError
217
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
218
+ end
219
+ end
220
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
221
+ # rubocop:enable Layout/EmptyLines
222
+ end
223
+ end
224
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,398 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require 'logger'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective
7
+ module OCI
8
+ # The alert rule.
9
+ class Budget::Models::AlertRule # rubocop:disable Metrics/LineLength
10
+ TYPE_ENUM = [
11
+ TYPE_ACTUAL = 'ACTUAL'.freeze,
12
+ TYPE_FORECAST = 'FORECAST'.freeze,
13
+ TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
14
+ ].freeze
15
+
16
+ THRESHOLD_TYPE_ENUM = [
17
+ THRESHOLD_TYPE_PERCENTAGE = 'PERCENTAGE'.freeze,
18
+ THRESHOLD_TYPE_ABSOLUTE = 'ABSOLUTE'.freeze,
19
+ THRESHOLD_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
20
+ ].freeze
21
+
22
+ LIFECYCLE_STATE_ENUM = [
23
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
24
+ LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
25
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
26
+ ].freeze
27
+
28
+ # **[Required]** The OCID of the alert rule
29
+ # @return [String]
30
+ attr_accessor :id
31
+
32
+ # **[Required]** The OCID of the budget
33
+ # @return [String]
34
+ attr_accessor :budget_id
35
+
36
+ # **[Required]** The name of the alert rule.
37
+ # @return [String]
38
+ attr_accessor :display_name
39
+
40
+ # **[Required]** The type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or
41
+ # FORECAST (the alert will trigger based on predicted usage).
42
+ #
43
+ # @return [String]
44
+ attr_reader :type
45
+
46
+ # **[Required]** The threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
47
+ #
48
+ # @return [Float]
49
+ attr_accessor :threshold
50
+
51
+ # **[Required]** The type of threshold.
52
+ # @return [String]
53
+ attr_reader :threshold_type
54
+
55
+ # **[Required]** The current state of the alert rule.
56
+ # @return [String]
57
+ attr_reader :lifecycle_state
58
+
59
+ # Custom message sent when alert is triggered
60
+ # @return [String]
61
+ attr_accessor :message
62
+
63
+ # The description of the alert rule.
64
+ # @return [String]
65
+ attr_accessor :description
66
+
67
+ # Version of the alert rule. Starts from 1 and increments by 1.
68
+ # @return [Integer]
69
+ attr_accessor :version
70
+
71
+ # **[Required]** Delimited list of email addresses to receive the alert when it triggers.
72
+ # Delimiter character can be comma, space, TAB, or semicolon.
73
+ #
74
+ # @return [String]
75
+ attr_accessor :recipients
76
+
77
+ # **[Required]** Time budget was created
78
+ # @return [DateTime]
79
+ attr_accessor :time_created
80
+
81
+ # **[Required]** Time budget was updated
82
+ # @return [DateTime]
83
+ attr_accessor :time_updated
84
+
85
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
86
+ # For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
87
+ #
88
+ # Example: `{\"Department\": \"Finance\"}`
89
+ #
90
+ # @return [Hash<String, String>]
91
+ attr_accessor :freeform_tags
92
+
93
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
94
+ # For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
95
+ #
96
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
97
+ #
98
+ # @return [Hash<String, Hash<String, Object>>]
99
+ attr_accessor :defined_tags
100
+
101
+ # Attribute mapping from ruby-style variable name to JSON key.
102
+ def self.attribute_map
103
+ {
104
+ # rubocop:disable Style/SymbolLiteral
105
+ 'id': :'id',
106
+ 'budget_id': :'budgetId',
107
+ 'display_name': :'displayName',
108
+ 'type': :'type',
109
+ 'threshold': :'threshold',
110
+ 'threshold_type': :'thresholdType',
111
+ 'lifecycle_state': :'lifecycleState',
112
+ 'message': :'message',
113
+ 'description': :'description',
114
+ 'version': :'version',
115
+ 'recipients': :'recipients',
116
+ 'time_created': :'timeCreated',
117
+ 'time_updated': :'timeUpdated',
118
+ 'freeform_tags': :'freeformTags',
119
+ 'defined_tags': :'definedTags'
120
+ # rubocop:enable Style/SymbolLiteral
121
+ }
122
+ end
123
+
124
+ # Attribute type mapping.
125
+ def self.swagger_types
126
+ {
127
+ # rubocop:disable Style/SymbolLiteral
128
+ 'id': :'String',
129
+ 'budget_id': :'String',
130
+ 'display_name': :'String',
131
+ 'type': :'String',
132
+ 'threshold': :'Float',
133
+ 'threshold_type': :'String',
134
+ 'lifecycle_state': :'String',
135
+ 'message': :'String',
136
+ 'description': :'String',
137
+ 'version': :'Integer',
138
+ 'recipients': :'String',
139
+ 'time_created': :'DateTime',
140
+ 'time_updated': :'DateTime',
141
+ 'freeform_tags': :'Hash<String, String>',
142
+ 'defined_tags': :'Hash<String, Hash<String, Object>>'
143
+ # rubocop:enable Style/SymbolLiteral
144
+ }
145
+ end
146
+
147
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
148
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
149
+
150
+
151
+ # Initializes the object
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @option attributes [String] :id The value to assign to the {#id} property
154
+ # @option attributes [String] :budget_id The value to assign to the {#budget_id} property
155
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
156
+ # @option attributes [String] :type The value to assign to the {#type} property
157
+ # @option attributes [Float] :threshold The value to assign to the {#threshold} property
158
+ # @option attributes [String] :threshold_type The value to assign to the {#threshold_type} property
159
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
160
+ # @option attributes [String] :message The value to assign to the {#message} property
161
+ # @option attributes [String] :description The value to assign to the {#description} property
162
+ # @option attributes [Integer] :version The value to assign to the {#version} property
163
+ # @option attributes [String] :recipients The value to assign to the {#recipients} property
164
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
165
+ # @option attributes [DateTime] :time_updated The value to assign to the {#time_updated} property
166
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
167
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
168
+ def initialize(attributes = {})
169
+ return unless attributes.is_a?(Hash)
170
+
171
+ # convert string to symbol for hash key
172
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
173
+
174
+ self.id = attributes[:'id'] if attributes[:'id']
175
+
176
+ self.budget_id = attributes[:'budgetId'] if attributes[:'budgetId']
177
+
178
+ raise 'You cannot provide both :budgetId and :budget_id' if attributes.key?(:'budgetId') && attributes.key?(:'budget_id')
179
+
180
+ self.budget_id = attributes[:'budget_id'] if attributes[:'budget_id']
181
+
182
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
183
+
184
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
185
+
186
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
187
+
188
+ self.type = attributes[:'type'] if attributes[:'type']
189
+
190
+ self.threshold = attributes[:'threshold'] if attributes[:'threshold']
191
+
192
+ self.threshold_type = attributes[:'thresholdType'] if attributes[:'thresholdType']
193
+
194
+ raise 'You cannot provide both :thresholdType and :threshold_type' if attributes.key?(:'thresholdType') && attributes.key?(:'threshold_type')
195
+
196
+ self.threshold_type = attributes[:'threshold_type'] if attributes[:'threshold_type']
197
+
198
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
199
+
200
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
201
+
202
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
203
+
204
+ self.message = attributes[:'message'] if attributes[:'message']
205
+
206
+ self.description = attributes[:'description'] if attributes[:'description']
207
+
208
+ self.version = attributes[:'version'] if attributes[:'version']
209
+
210
+ self.recipients = attributes[:'recipients'] if attributes[:'recipients']
211
+
212
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
213
+
214
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
215
+
216
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
217
+
218
+ self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']
219
+
220
+ raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated')
221
+
222
+ self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated']
223
+
224
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
225
+
226
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
227
+
228
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
229
+
230
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
231
+
232
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
233
+
234
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
235
+ end
236
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
237
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
238
+
239
+ # Custom attribute writer method checking allowed values (enum).
240
+ # @param [Object] type Object to be assigned
241
+ def type=(type)
242
+ # rubocop:disable Style/ConditionalAssignment
243
+ if type && !TYPE_ENUM.include?(type)
244
+ # rubocop: disable Metrics/LineLength
245
+ OCI.logger.debug("Unknown value for 'type' [" + type + "]. Mapping to 'TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
246
+ # rubocop: enable Metrics/LineLength
247
+ @type = TYPE_UNKNOWN_ENUM_VALUE
248
+ else
249
+ @type = type
250
+ end
251
+ # rubocop:enable Style/ConditionalAssignment
252
+ end
253
+
254
+ # Custom attribute writer method checking allowed values (enum).
255
+ # @param [Object] threshold_type Object to be assigned
256
+ def threshold_type=(threshold_type)
257
+ # rubocop:disable Style/ConditionalAssignment
258
+ if threshold_type && !THRESHOLD_TYPE_ENUM.include?(threshold_type)
259
+ # rubocop: disable Metrics/LineLength
260
+ OCI.logger.debug("Unknown value for 'threshold_type' [" + threshold_type + "]. Mapping to 'THRESHOLD_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
261
+ # rubocop: enable Metrics/LineLength
262
+ @threshold_type = THRESHOLD_TYPE_UNKNOWN_ENUM_VALUE
263
+ else
264
+ @threshold_type = threshold_type
265
+ end
266
+ # rubocop:enable Style/ConditionalAssignment
267
+ end
268
+
269
+ # Custom attribute writer method checking allowed values (enum).
270
+ # @param [Object] lifecycle_state Object to be assigned
271
+ def lifecycle_state=(lifecycle_state)
272
+ # rubocop:disable Style/ConditionalAssignment
273
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
274
+ # rubocop: disable Metrics/LineLength
275
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
276
+ # rubocop: enable Metrics/LineLength
277
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
278
+ else
279
+ @lifecycle_state = lifecycle_state
280
+ end
281
+ # rubocop:enable Style/ConditionalAssignment
282
+ end
283
+
284
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
285
+
286
+
287
+ # Checks equality by comparing each attribute.
288
+ # @param [Object] other the other object to be compared
289
+ def ==(other)
290
+ return true if equal?(other)
291
+
292
+ self.class == other.class &&
293
+ id == other.id &&
294
+ budget_id == other.budget_id &&
295
+ display_name == other.display_name &&
296
+ type == other.type &&
297
+ threshold == other.threshold &&
298
+ threshold_type == other.threshold_type &&
299
+ lifecycle_state == other.lifecycle_state &&
300
+ message == other.message &&
301
+ description == other.description &&
302
+ version == other.version &&
303
+ recipients == other.recipients &&
304
+ time_created == other.time_created &&
305
+ time_updated == other.time_updated &&
306
+ freeform_tags == other.freeform_tags &&
307
+ defined_tags == other.defined_tags
308
+ end
309
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
310
+
311
+ # @see the `==` method
312
+ # @param [Object] other the other object to be compared
313
+ def eql?(other)
314
+ self == other
315
+ end
316
+
317
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
318
+
319
+
320
+ # Calculates hash code according to all attributes.
321
+ # @return [Fixnum] Hash code
322
+ def hash
323
+ [id, budget_id, display_name, type, threshold, threshold_type, lifecycle_state, message, description, version, recipients, time_created, time_updated, freeform_tags, defined_tags].hash
324
+ end
325
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
326
+
327
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
328
+
329
+
330
+ # Builds the object from hash
331
+ # @param [Hash] attributes Model attributes in the form of hash
332
+ # @return [Object] Returns the model itself
333
+ def build_from_hash(attributes)
334
+ return nil unless attributes.is_a?(Hash)
335
+
336
+ self.class.swagger_types.each_pair do |key, type|
337
+ if type =~ /^Array<(.*)>/i
338
+ # check to ensure the input is an array given that the the attribute
339
+ # is documented as an array but the input is not
340
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
341
+ public_method("#{key}=").call(
342
+ attributes[self.class.attribute_map[key]]
343
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
344
+ )
345
+ end
346
+ elsif !attributes[self.class.attribute_map[key]].nil?
347
+ public_method("#{key}=").call(
348
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
349
+ )
350
+ end
351
+ # or else data not found in attributes(hash), not an issue as the data can be optional
352
+ end
353
+
354
+ self
355
+ end
356
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
357
+
358
+ # Returns the string representation of the object
359
+ # @return [String] String presentation of the object
360
+ def to_s
361
+ to_hash.to_s
362
+ end
363
+
364
+ # Returns the object in the form of hash
365
+ # @return [Hash] Returns the object in the form of hash
366
+ def to_hash
367
+ hash = {}
368
+ self.class.attribute_map.each_pair do |attr, param|
369
+ value = public_method(attr).call
370
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
371
+
372
+ hash[param] = _to_hash(value)
373
+ end
374
+ hash
375
+ end
376
+
377
+ private
378
+
379
+ # Outputs non-array value in the form of hash
380
+ # For object, use to_hash. Otherwise, just return the value
381
+ # @param [Object] value Any valid value
382
+ # @return [Hash] Returns the value in the form of hash
383
+ def _to_hash(value)
384
+ if value.is_a?(Array)
385
+ value.compact.map { |v| _to_hash(v) }
386
+ elsif value.is_a?(Hash)
387
+ {}.tap do |hash|
388
+ value.each { |k, v| hash[k] = _to_hash(v) }
389
+ end
390
+ elsif value.respond_to? :to_hash
391
+ value.to_hash
392
+ else
393
+ value
394
+ end
395
+ end
396
+ end
397
+ end
398
+ # rubocop:enable Lint/UnneededCopDisableDirective