oci 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -1
  3. data/lib/oci.rb +4 -0
  4. data/lib/oci/analytics/analytics.rb +42 -0
  5. data/lib/oci/analytics/analytics_client.rb +1134 -0
  6. data/lib/oci/analytics/analytics_client_composite_operations.rb +371 -0
  7. data/lib/oci/analytics/models/analytics_instance.rb +406 -0
  8. data/lib/oci/analytics/models/analytics_instance_lifecycle_state.rb +15 -0
  9. data/lib/oci/analytics/models/analytics_instance_summary.rb +370 -0
  10. data/lib/oci/analytics/models/capacity.rb +191 -0
  11. data/lib/oci/analytics/models/capacity_type.rb +10 -0
  12. data/lib/oci/analytics/models/change_compartment_details.rb +155 -0
  13. data/lib/oci/analytics/models/create_analytics_instance_details.rb +309 -0
  14. data/lib/oci/analytics/models/feature_set.rb +10 -0
  15. data/lib/oci/analytics/models/license_type.rb +10 -0
  16. data/lib/oci/analytics/models/scale_analytics_instance_details.rb +150 -0
  17. data/lib/oci/analytics/models/sort_by.rb +13 -0
  18. data/lib/oci/analytics/models/sort_order.rb +10 -0
  19. data/lib/oci/analytics/models/update_analytics_instance_details.rb +231 -0
  20. data/lib/oci/analytics/models/work_request.rb +316 -0
  21. data/lib/oci/analytics/models/work_request_action_result.rb +15 -0
  22. data/lib/oci/analytics/models/work_request_error.rb +176 -0
  23. data/lib/oci/analytics/models/work_request_log.rb +164 -0
  24. data/lib/oci/analytics/models/work_request_operation_type.rb +14 -0
  25. data/lib/oci/analytics/models/work_request_resource.rb +248 -0
  26. data/lib/oci/analytics/models/work_request_resource_type.rb +9 -0
  27. data/lib/oci/analytics/models/work_request_sort_by.rb +14 -0
  28. data/lib/oci/analytics/models/work_request_status.rb +14 -0
  29. data/lib/oci/analytics/models/work_request_summary.rb +300 -0
  30. data/lib/oci/analytics/util.rb +2 -0
  31. data/lib/oci/audit/audit.rb +5 -0
  32. data/lib/oci/audit/audit_client.rb +30 -14
  33. data/lib/oci/audit/models/audit_event.rb +81 -261
  34. data/lib/oci/audit/models/configuration.rb +7 -2
  35. data/lib/oci/audit/models/data.rb +464 -0
  36. data/lib/oci/audit/models/identity.rb +313 -0
  37. data/lib/oci/audit/models/request.rb +285 -0
  38. data/lib/oci/audit/models/response.rb +273 -0
  39. data/lib/oci/audit/models/state_change.rb +175 -0
  40. data/lib/oci/audit/models/update_configuration_details.rb +7 -2
  41. data/lib/oci/container_engine/container_engine.rb +4 -0
  42. data/lib/oci/container_engine/models/cluster.rb +15 -1
  43. data/lib/oci/container_engine/models/create_cluster_details.rb +17 -1
  44. data/lib/oci/container_engine/models/create_cluster_kubeconfig_content_details.rb +4 -1
  45. data/lib/oci/container_engine/models/create_node_pool_details.rb +29 -6
  46. data/lib/oci/container_engine/models/create_node_pool_node_config_details.rb +170 -0
  47. data/lib/oci/container_engine/models/node_pool.rb +18 -4
  48. data/lib/oci/container_engine/models/node_pool_node_config_details.rb +170 -0
  49. data/lib/oci/container_engine/models/node_pool_options.rb +1 -1
  50. data/lib/oci/container_engine/models/node_pool_placement_config_details.rb +169 -0
  51. data/lib/oci/container_engine/models/node_pool_summary.rb +18 -4
  52. data/lib/oci/container_engine/models/update_node_pool_details.rb +45 -19
  53. data/lib/oci/container_engine/models/update_node_pool_node_config_details.rb +170 -0
  54. data/lib/oci/core/blockstorage_client.rb +197 -0
  55. data/lib/oci/core/compute_client.rb +132 -17
  56. data/lib/oci/core/compute_client_composite_operations.rb +1 -1
  57. data/lib/oci/core/compute_management_client.rb +493 -0
  58. data/lib/oci/core/compute_management_client_composite_operations.rb +119 -0
  59. data/lib/oci/core/core.rb +11 -0
  60. data/lib/oci/core/models/boot_volume.rb +17 -1
  61. data/lib/oci/core/models/boot_volume_backup.rb +17 -1
  62. data/lib/oci/core/models/change_cluster_network_compartment_details.rb +155 -0
  63. data/lib/oci/core/models/change_dedicated_vm_host_compartment_details.rb +2 -2
  64. data/lib/oci/core/models/change_drg_compartment_details.rb +155 -0
  65. data/lib/oci/core/models/cluster_network.rb +313 -0
  66. data/lib/oci/core/models/cluster_network_placement_configuration_details.rb +183 -0
  67. data/lib/oci/core/models/cluster_network_summary.rb +299 -0
  68. data/lib/oci/core/models/create_cluster_network_details.rb +231 -0
  69. data/lib/oci/core/models/create_cluster_network_instance_pool_details.rb +213 -0
  70. data/lib/oci/core/models/create_dedicated_vm_host_details.rb +10 -8
  71. data/lib/oci/core/models/create_ip_sec_connection_details.rb +4 -0
  72. data/lib/oci/core/models/create_ip_sec_connection_tunnel_details.rb +29 -1
  73. data/lib/oci/core/models/create_volume_backup_policy_details.rb +215 -0
  74. data/lib/oci/core/models/dedicated_vm_host.rb +10 -8
  75. data/lib/oci/core/models/image_shape_compatibility_entry.rb +163 -0
  76. data/lib/oci/core/models/instance.rb +17 -1
  77. data/lib/oci/core/models/ip_sec_connection.rb +4 -0
  78. data/lib/oci/core/models/ip_sec_connection_tunnel.rb +35 -1
  79. data/lib/oci/core/models/launch_instance_details.rb +14 -1
  80. data/lib/oci/core/models/launch_options.rb +4 -4
  81. data/lib/oci/core/models/service_gateway.rb +0 -1
  82. data/lib/oci/core/models/update_cluster_network_details.rb +189 -0
  83. data/lib/oci/core/models/update_dedicated_vm_host_details.rb +1 -1
  84. data/lib/oci/core/models/update_ip_sec_connection_details.rb +4 -0
  85. data/lib/oci/core/models/update_ip_sec_connection_tunnel_details.rb +29 -1
  86. data/lib/oci/core/models/update_service_gateway_details.rb +0 -1
  87. data/lib/oci/core/models/update_volume_backup_policy_details.rb +201 -0
  88. data/lib/oci/core/models/volume.rb +17 -1
  89. data/lib/oci/core/models/volume_backup.rb +17 -1
  90. data/lib/oci/core/models/volume_backup_policy.rb +54 -4
  91. data/lib/oci/core/models/volume_backup_schedule.rb +177 -4
  92. data/lib/oci/core/virtual_network_client.rb +67 -0
  93. data/lib/oci/database/database.rb +35 -1
  94. data/lib/oci/database/database_client.rb +3351 -1159
  95. data/lib/oci/database/database_client_composite_operations.rb +522 -1
  96. data/lib/oci/database/models/activate_exadata_infrastructure_details.rb +153 -0
  97. data/lib/oci/database/models/associated_database_details.rb +163 -0
  98. data/lib/oci/database/models/autonomous_container_database.rb +0 -2
  99. data/lib/oci/database/models/autonomous_container_database_summary.rb +0 -2
  100. data/lib/oci/database/models/autonomous_data_warehouse.rb +0 -2
  101. data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +0 -2
  102. data/lib/oci/database/models/autonomous_database.rb +65 -4
  103. data/lib/oci/database/models/autonomous_database_summary.rb +65 -4
  104. data/lib/oci/database/models/autonomous_database_wallet.rb +188 -0
  105. data/lib/oci/database/models/autonomous_exadata_infrastructure.rb +16 -3
  106. data/lib/oci/database/models/autonomous_exadata_infrastructure_summary.rb +16 -3
  107. data/lib/oci/database/models/backup_destination.rb +359 -0
  108. data/lib/oci/database/models/backup_destination_details.rb +243 -0
  109. data/lib/oci/database/models/backup_destination_summary.rb +362 -0
  110. data/lib/oci/database/models/change_exadata_infrastructure_compartment_details.rb +155 -0
  111. data/lib/oci/database/models/change_vm_cluster_compartment_details.rb +155 -0
  112. data/lib/oci/database/models/create_autonomous_container_database_details.rb +0 -2
  113. data/lib/oci/database/models/create_autonomous_data_warehouse_details.rb +0 -2
  114. data/lib/oci/database/models/create_autonomous_database_base.rb +19 -4
  115. data/lib/oci/database/models/create_autonomous_database_clone_details.rb +6 -2
  116. data/lib/oci/database/models/create_autonomous_database_details.rb +5 -1
  117. data/lib/oci/database/models/create_backup_destination_details.rb +241 -0
  118. data/lib/oci/database/models/create_database_details.rb +15 -3
  119. data/lib/oci/database/models/create_database_from_backup_details.rb +15 -1
  120. data/lib/oci/database/models/{create_db_home_with_db_system_id_base.rb → create_db_home_base.rb} +8 -18
  121. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +18 -8
  122. data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +18 -8
  123. data/lib/oci/database/models/create_db_home_with_vm_cluster_id_details.rb +190 -0
  124. data/lib/oci/database/models/create_db_home_with_vm_cluster_id_from_backup_details.rb +176 -0
  125. data/lib/oci/database/models/create_exadata_infrastructure_details.rb +348 -0
  126. data/lib/oci/database/models/create_nfs_backup_destination_details.rb +178 -0
  127. data/lib/oci/database/models/create_recovery_appliance_backup_destination_details.rb +191 -0
  128. data/lib/oci/database/models/create_vm_cluster_details.rb +344 -0
  129. data/lib/oci/database/models/database.rb +0 -2
  130. data/lib/oci/database/models/database_summary.rb +0 -2
  131. data/lib/oci/database/models/db_backup_config.rb +65 -4
  132. data/lib/oci/database/models/db_home.rb +15 -1
  133. data/lib/oci/database/models/db_home_summary.rb +15 -1
  134. data/lib/oci/database/models/db_system.rb +14 -3
  135. data/lib/oci/database/models/db_system_options.rb +173 -0
  136. data/lib/oci/database/models/db_system_shape_summary.rb +15 -1
  137. data/lib/oci/database/models/db_system_summary.rb +14 -3
  138. data/lib/oci/database/models/exadata_infrastructure.rb +450 -0
  139. data/lib/oci/database/models/exadata_infrastructure_summary.rb +453 -0
  140. data/lib/oci/database/models/generate_autonomous_database_wallet_details.rb +31 -1
  141. data/lib/oci/database/models/generate_recommended_network_details.rb +232 -0
  142. data/lib/oci/database/models/gi_version_summary.rb +152 -0
  143. data/lib/oci/database/models/info_for_network_gen_details.rb +231 -0
  144. data/lib/oci/database/models/launch_autonomous_exadata_infrastructure_details.rb +16 -3
  145. data/lib/oci/database/models/launch_db_system_base.rb +14 -3
  146. data/lib/oci/database/models/launch_db_system_details.rb +5 -1
  147. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +5 -1
  148. data/lib/oci/database/models/node_details.rb +183 -0
  149. data/lib/oci/database/models/scan_details.rb +170 -0
  150. data/lib/oci/database/models/update_autonomous_container_database_details.rb +0 -2
  151. data/lib/oci/database/models/update_autonomous_data_warehouse_details.rb +0 -2
  152. data/lib/oci/database/models/update_autonomous_database_details.rb +19 -4
  153. data/lib/oci/database/models/update_autonomous_database_wallet_details.rb +156 -0
  154. data/lib/oci/database/models/update_autonomous_exadata_infrastructure_details.rb +16 -3
  155. data/lib/oci/database/models/update_backup_destination_details.rb +218 -0
  156. data/lib/oci/database/models/update_database_details.rb +0 -2
  157. data/lib/oci/database/models/update_db_system_details.rb +0 -2
  158. data/lib/oci/database/models/update_exadata_infrastructure_details.rb +307 -0
  159. data/lib/oci/database/models/update_vm_cluster_details.rb +229 -0
  160. data/lib/oci/database/models/update_vm_cluster_network_details.rb +218 -0
  161. data/lib/oci/database/models/vm_cluster.rb +449 -0
  162. data/lib/oci/database/models/vm_cluster_network.rb +350 -0
  163. data/lib/oci/database/models/vm_cluster_network_details.rb +246 -0
  164. data/lib/oci/database/models/vm_cluster_network_summary.rb +353 -0
  165. data/lib/oci/database/models/vm_cluster_summary.rb +452 -0
  166. data/lib/oci/database/models/vm_network_details.rb +231 -0
  167. data/lib/oci/dns/dns.rb +4 -0
  168. data/lib/oci/dns/dns_client.rb +103 -103
  169. data/lib/oci/dns/dns_client_composite_operations.rb +1 -1
  170. data/lib/oci/dns/models/create_migrated_dynect_zone_details.rb +179 -0
  171. data/lib/oci/dns/models/create_zone_base_details.rb +252 -0
  172. data/lib/oci/dns/models/create_zone_details.rb +18 -56
  173. data/lib/oci/dns/models/dynect_migration_details.rb +192 -0
  174. data/lib/oci/dns/models/migration_replacement.rb +187 -0
  175. data/lib/oci/dts/dts.rb +2 -0
  176. data/lib/oci/dts/models/create_transfer_appliance_entitlement_details.rb +49 -4
  177. data/lib/oci/dts/models/transfer_appliance.rb +2 -0
  178. data/lib/oci/dts/models/transfer_appliance_entitlement.rb +102 -33
  179. data/lib/oci/dts/models/transfer_appliance_entitlement_summary.rb +261 -0
  180. data/lib/oci/dts/models/transfer_appliance_summary.rb +2 -0
  181. data/lib/oci/dts/models/transfer_job.rb +0 -4
  182. data/lib/oci/dts/models/update_transfer_appliance_details.rb +1 -0
  183. data/lib/oci/dts/shipping_vendors_client.rb +1 -1
  184. data/lib/oci/dts/transfer_appliance_client.rb +4 -4
  185. data/lib/oci/dts/transfer_appliance_entitlement_client.rb +86 -10
  186. data/lib/oci/dts/transfer_appliance_entitlement_client_composite_operations.rb +39 -0
  187. data/lib/oci/dts/transfer_device_client.rb +1 -1
  188. data/lib/oci/dts/transfer_job_client.rb +1 -1
  189. data/lib/oci/dts/transfer_package_client.rb +1 -1
  190. data/lib/oci/functions/functions_invoke_client.rb +1 -1
  191. data/lib/oci/functions/functions_management_client.rb +1 -1
  192. data/lib/oci/healthchecks/health_checks_client.rb +18 -14
  193. data/lib/oci/healthchecks/models/http_monitor.rb +31 -1
  194. data/lib/oci/healthchecks/models/http_monitor_summary.rb +31 -1
  195. data/lib/oci/healthchecks/models/http_probe.rb +31 -1
  196. data/lib/oci/healthchecks/models/ping_monitor.rb +31 -1
  197. data/lib/oci/healthchecks/models/ping_monitor_summary.rb +31 -1
  198. data/lib/oci/healthchecks/models/ping_probe.rb +31 -1
  199. data/lib/oci/identity/identity.rb +7 -0
  200. data/lib/oci/identity/identity_client.rb +348 -9
  201. data/lib/oci/identity/models/base_tag_definition_validator.rb +200 -0
  202. data/lib/oci/identity/models/compartment.rb +3 -0
  203. data/lib/oci/identity/models/create_region_subscription_details.rb +3 -0
  204. data/lib/oci/identity/models/create_tag_default_details.rb +26 -4
  205. data/lib/oci/identity/models/create_tag_details.rb +21 -5
  206. data/lib/oci/identity/models/default_tag_definition_validator.rb +146 -0
  207. data/lib/oci/identity/models/dynamic_group.rb +3 -0
  208. data/lib/oci/identity/models/enum_tag_definition_validator.rb +161 -0
  209. data/lib/oci/identity/models/group.rb +3 -0
  210. data/lib/oci/identity/models/identity_provider.rb +3 -0
  211. data/lib/oci/identity/models/move_compartment_details.rb +2 -2
  212. data/lib/oci/identity/models/policy.rb +3 -0
  213. data/lib/oci/identity/models/region.rb +9 -3
  214. data/lib/oci/identity/models/region_subscription.rb +8 -2
  215. data/lib/oci/identity/models/tag.rb +25 -6
  216. data/lib/oci/identity/models/tag_default.rb +26 -4
  217. data/lib/oci/identity/models/tag_default_summary.rb +26 -4
  218. data/lib/oci/identity/models/tag_namespace.rb +5 -2
  219. data/lib/oci/identity/models/tag_summary.rb +3 -2
  220. data/lib/oci/identity/models/tagging_work_request.rb +305 -0
  221. data/lib/oci/identity/models/tagging_work_request_error_summary.rb +172 -0
  222. data/lib/oci/identity/models/tagging_work_request_log_summary.rb +162 -0
  223. data/lib/oci/identity/models/tagging_work_request_summary.rb +304 -0
  224. data/lib/oci/identity/models/tenancy.rb +3 -0
  225. data/lib/oci/identity/models/update_tag_default_details.rb +26 -4
  226. data/lib/oci/identity/models/update_tag_details.rb +19 -4
  227. data/lib/oci/identity/models/user.rb +3 -0
  228. data/lib/oci/integration/integration.rb +29 -0
  229. data/lib/oci/integration/integration_instance_client.rb +731 -0
  230. data/lib/oci/integration/integration_instance_client_composite_operations.rb +222 -0
  231. data/lib/oci/integration/models/change_integration_instance_compartment_details.rb +153 -0
  232. data/lib/oci/integration/models/create_integration_instance_details.rb +270 -0
  233. data/lib/oci/integration/models/integration_instance.rb +366 -0
  234. data/lib/oci/integration/models/integration_instance_summary.rb +332 -0
  235. data/lib/oci/integration/models/update_integration_instance_details.rb +242 -0
  236. data/lib/oci/integration/models/work_request.rb +310 -0
  237. data/lib/oci/integration/models/work_request_error.rb +170 -0
  238. data/lib/oci/integration/models/work_request_log_entry.rb +159 -0
  239. data/lib/oci/integration/models/work_request_resource.rb +218 -0
  240. data/lib/oci/integration/models/work_request_summary.rb +310 -0
  241. data/lib/oci/integration/util.rb +2 -0
  242. data/lib/oci/load_balancer/load_balancer_client.rb +3 -3
  243. data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +2 -2
  244. data/lib/oci/load_balancer/models/backend.rb +2 -0
  245. data/lib/oci/load_balancer/models/backend_details.rb +2 -0
  246. data/lib/oci/load_balancer/models/create_backend_details.rb +2 -0
  247. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +12 -1
  248. data/lib/oci/load_balancer/models/health_checker.rb +2 -1
  249. data/lib/oci/load_balancer/models/health_checker_details.rb +2 -1
  250. data/lib/oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.rb +2 -2
  251. data/lib/oci/load_balancer/models/load_balancer.rb +33 -2
  252. data/lib/oci/load_balancer/models/update_backend_details.rb +2 -0
  253. data/lib/oci/load_balancer/models/update_health_checker_details.rb +2 -1
  254. data/lib/oci/load_balancer/models/update_network_security_groups_details.rb +15 -2
  255. data/lib/oci/monitoring/models/alarm.rb +6 -5
  256. data/lib/oci/monitoring/models/create_alarm_details.rb +6 -5
  257. data/lib/oci/monitoring/models/update_alarm_details.rb +6 -5
  258. data/lib/oci/monitoring/monitoring_client.rb +25 -9
  259. data/lib/oci/object_storage/models/bucket.rb +17 -1
  260. data/lib/oci/object_storage/models/create_bucket_details.rb +17 -1
  261. data/lib/oci/object_storage/models/update_bucket_details.rb +18 -2
  262. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +1 -1
  263. data/lib/oci/object_storage/models/work_request.rb +7 -4
  264. data/lib/oci/object_storage/models/work_request_summary.rb +7 -4
  265. data/lib/oci/object_storage/object_storage_client.rb +75 -4
  266. data/lib/oci/object_storage/object_storage_client_composite_operations.rb +52 -0
  267. data/lib/oci/oce/models/change_oce_instance_compartment_details.rb +155 -0
  268. data/lib/oci/oce/models/create_oce_instance_details.rb +275 -0
  269. data/lib/oci/oce/models/delete_oce_instance_details.rb +153 -0
  270. data/lib/oci/oce/models/oce_instance.rb +387 -0
  271. data/lib/oci/oce/models/oce_instance_summary.rb +387 -0
  272. data/lib/oci/oce/models/update_oce_instance_details.rb +181 -0
  273. data/lib/oci/oce/models/work_request.rb +319 -0
  274. data/lib/oci/oce/models/work_request_error.rb +172 -0
  275. data/lib/oci/oce/models/work_request_log_entry.rb +159 -0
  276. data/lib/oci/oce/models/work_request_resource.rb +217 -0
  277. data/lib/oci/oce/models/workflow_monitor.rb +181 -0
  278. data/lib/oci/oce/models/workflow_step.rb +163 -0
  279. data/lib/oci/oce/oce.rb +31 -0
  280. data/lib/oci/oce/oce_instance_client.rb +733 -0
  281. data/lib/oci/oce/oce_instance_client_composite_operations.rb +223 -0
  282. data/lib/oci/oce/util.rb +2 -0
  283. data/lib/oci/oda/models/change_oda_instance_compartment_details.rb +153 -0
  284. data/lib/oci/oda/models/create_oda_instance_details.rb +237 -0
  285. data/lib/oci/oda/models/error_body.rb +159 -0
  286. data/lib/oci/oda/models/oda_instance.rb +399 -0
  287. data/lib/oci/oda/models/oda_instance_summary.rb +369 -0
  288. data/lib/oci/oda/models/update_oda_instance_details.rb +196 -0
  289. data/lib/oci/oda/models/work_request.rb +340 -0
  290. data/lib/oci/oda/models/work_request_error.rb +176 -0
  291. data/lib/oci/oda/models/work_request_log_entry.rb +163 -0
  292. data/lib/oci/oda/models/work_request_resource.rb +272 -0
  293. data/lib/oci/oda/models/work_request_summary.rb +262 -0
  294. data/lib/oci/oda/oda.rb +30 -0
  295. data/lib/oci/oda/oda_client.rb +842 -0
  296. data/lib/oci/oda/oda_client_composite_operations.rb +212 -0
  297. data/lib/oci/oda/util.rb +2 -0
  298. data/lib/oci/ons/models/backoff_retry_policy.rb +2 -1
  299. data/lib/oci/ons/models/confirmation_result.rb +5 -3
  300. data/lib/oci/ons/models/create_subscription_details.rb +19 -4
  301. data/lib/oci/ons/models/notification_topic.rb +2 -1
  302. data/lib/oci/ons/models/subscription.rb +8 -3
  303. data/lib/oci/ons/models/subscription_summary.rb +5 -3
  304. data/lib/oci/ons/notification_control_plane_client.rb +4 -3
  305. data/lib/oci/ons/notification_data_plane_client.rb +28 -4
  306. data/lib/oci/regions.rb +3 -0
  307. data/lib/oci/resource_manager/models/apply_job_operation_details.rb +201 -0
  308. data/lib/oci/resource_manager/models/apply_job_operation_details_summary.rb +180 -0
  309. data/lib/oci/resource_manager/models/apply_job_plan_resolution.rb +4 -5
  310. data/lib/oci/resource_manager/models/config_source.rb +3 -2
  311. data/lib/oci/resource_manager/models/create_apply_job_operation_details.rb +179 -0
  312. data/lib/oci/resource_manager/models/create_config_source_details.rb +2 -1
  313. data/lib/oci/resource_manager/models/create_destroy_job_operation_details.rb +165 -0
  314. data/lib/oci/resource_manager/models/create_import_tf_state_job_operation_details.rb +163 -0
  315. data/lib/oci/resource_manager/models/create_job_details.rb +16 -3
  316. data/lib/oci/resource_manager/models/create_job_operation_details.rb +169 -0
  317. data/lib/oci/resource_manager/models/create_plan_job_operation_details.rb +145 -0
  318. data/lib/oci/resource_manager/models/create_stack_details.rb +17 -2
  319. data/lib/oci/resource_manager/models/destroy_job_operation_details.rb +184 -0
  320. data/lib/oci/resource_manager/models/destroy_job_operation_details_summary.rb +165 -0
  321. data/lib/oci/resource_manager/models/import_tf_state_job_operation_details.rb +145 -0
  322. data/lib/oci/resource_manager/models/import_tf_state_job_operation_details_summary.rb +145 -0
  323. data/lib/oci/resource_manager/models/job.rb +23 -5
  324. data/lib/oci/resource_manager/models/job_operation_details.rb +169 -0
  325. data/lib/oci/resource_manager/models/job_operation_details_summary.rb +169 -0
  326. data/lib/oci/resource_manager/models/job_summary.rb +20 -5
  327. data/lib/oci/resource_manager/models/plan_job_operation_details.rb +145 -0
  328. data/lib/oci/resource_manager/models/plan_job_operation_details_summary.rb +145 -0
  329. data/lib/oci/resource_manager/models/stack.rb +18 -6
  330. data/lib/oci/resource_manager/models/stack_summary.rb +16 -1
  331. data/lib/oci/resource_manager/models/terraform_version_collection.rb +150 -0
  332. data/lib/oci/resource_manager/models/terraform_version_summary.rb +151 -0
  333. data/lib/oci/resource_manager/models/update_config_source_details.rb +3 -1
  334. data/lib/oci/resource_manager/models/update_stack_details.rb +16 -1
  335. data/lib/oci/resource_manager/models/work_request.rb +2 -2
  336. data/lib/oci/resource_manager/models/work_request_resource.rb +1 -1
  337. data/lib/oci/resource_manager/models/work_request_summary.rb +2 -2
  338. data/lib/oci/resource_manager/resource_manager.rb +17 -0
  339. data/lib/oci/resource_manager/resource_manager_client.rb +187 -29
  340. data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +6 -6
  341. data/lib/oci/version.rb +1 -1
  342. data/lib/oci/waas/models/access_rule.rb +2 -2
  343. data/lib/oci/waas/models/access_rule_criteria.rb +1 -1
  344. data/lib/oci/waas/models/address_list.rb +1 -0
  345. data/lib/oci/waas/models/address_rate_limiting.rb +1 -1
  346. data/lib/oci/waas/models/block_challenge_settings.rb +1 -1
  347. data/lib/oci/waas/models/caching_rule.rb +9 -8
  348. data/lib/oci/waas/models/caching_rule_criteria.rb +1 -5
  349. data/lib/oci/waas/models/caching_rule_summary.rb +9 -8
  350. data/lib/oci/waas/models/change_address_list_compartment_details.rb +1 -1
  351. data/lib/oci/waas/models/change_certificate_compartment_details.rb +1 -0
  352. data/lib/oci/waas/models/change_custom_protection_rule_compartment_details.rb +1 -1
  353. data/lib/oci/waas/models/change_http_redirect_compartment_details.rb +154 -0
  354. data/lib/oci/waas/models/change_waas_policy_compartment_details.rb +1 -0
  355. data/lib/oci/waas/models/create_address_list_details.rb +1 -1
  356. data/lib/oci/waas/models/create_custom_protection_rule_details.rb +17 -12
  357. data/lib/oci/waas/models/create_http_redirect_details.rb +238 -0
  358. data/lib/oci/waas/models/create_waas_policy_details.rb +2 -1
  359. data/lib/oci/waas/models/custom_protection_rule.rb +20 -16
  360. data/lib/oci/waas/models/custom_protection_rule_setting.rb +4 -3
  361. data/lib/oci/waas/models/custom_protection_rule_summary.rb +6 -6
  362. data/lib/oci/waas/models/http_redirect.rb +301 -0
  363. data/lib/oci/waas/models/http_redirect_summary.rb +301 -0
  364. data/lib/oci/waas/models/http_redirect_target.rb +209 -0
  365. data/lib/oci/waas/models/origin_group_origins.rb +2 -2
  366. data/lib/oci/waas/models/policy_config.rb +14 -7
  367. data/lib/oci/waas/models/protection_settings.rb +1 -1
  368. data/lib/oci/waas/models/purge_cache.rb +2 -2
  369. data/lib/oci/waas/models/update_address_list_details.rb +1 -1
  370. data/lib/oci/waas/models/update_custom_protection_rule_details.rb +16 -12
  371. data/lib/oci/waas/models/update_http_redirect_details.rb +215 -0
  372. data/lib/oci/waas/models/update_waas_policy_details.rb +2 -1
  373. data/lib/oci/waas/models/waas_policy.rb +1 -1
  374. data/lib/oci/waas/models/waas_policy_custom_protection_rule_summary.rb +5 -4
  375. data/lib/oci/waas/models/waf_config.rb +2 -1
  376. data/lib/oci/waas/models/waf_config_details.rb +2 -1
  377. data/lib/oci/waas/models/work_request.rb +3 -0
  378. data/lib/oci/waas/models/work_request_operation_types.rb +3 -0
  379. data/lib/oci/waas/models/work_request_summary.rb +3 -0
  380. data/lib/oci/waas/redirect_client.rb +493 -0
  381. data/lib/oci/waas/redirect_client_composite_operations.rb +172 -0
  382. data/lib/oci/waas/waas.rb +8 -0
  383. data/lib/oci/waas/waas_client.rb +35 -23
  384. data/lib/oci/waas/waas_client_composite_operations.rb +4 -4
  385. metadata +166 -3
@@ -0,0 +1,223 @@
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::Oce::OceInstanceClient} 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 Oce::OceInstanceClientCompositeOperations
10
+ # The {OCI::Oce::OceInstanceClient} used to communicate with the service_client
11
+ #
12
+ # @return [OCI::Oce::OceInstanceClient]
13
+ attr_reader :service_client
14
+
15
+ # Initializes a new OceInstanceClientCompositeOperations
16
+ #
17
+ # @param [OCI::Oce::OceInstanceClient] service_client The client used to communicate with the service.
18
+ # Defaults to a new service client created via {OCI::Oce::OceInstanceClient#initialize} with no arguments
19
+ def initialize(service_client = OCI::Oce::OceInstanceClient.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::Oce::OceInstanceClient#change_oce_instance_compartment} and then waits for the {OCI::Oce::Models::WorkRequest}
28
+ # to enter the given state(s).
29
+ #
30
+ # @param [String] oce_instance_id unique OceInstance identifier
31
+ # @param [OCI::Oce::Models::ChangeOceInstanceCompartmentDetails] change_oce_instance_compartment_details The information about compartment details to be moved.
32
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Oce::Models::WorkRequest#status}
33
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Oce::OceInstanceClient#change_oce_instance_compartment}
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 containing the completed {OCI::Oce::Models::WorkRequest}
39
+ def change_oce_instance_compartment_and_wait_for_state(oce_instance_id, change_oce_instance_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
40
+ operation_result = @service_client.change_oce_instance_compartment(oce_instance_id, change_oce_instance_compartment_details, base_operation_opts)
41
+ use_util = OCI::Oce::Util.respond_to?(:wait_on_work_request)
42
+
43
+ return operation_result if wait_for_states.empty? && !use_util
44
+
45
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
46
+ wait_for_resource_id = operation_result.headers['opc-work-request-id']
47
+
48
+ begin
49
+ if use_util
50
+ waiter_result = OCI::Oce::Util.wait_on_work_request(
51
+ @service_client,
52
+ wait_for_resource_id,
53
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
54
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
55
+ )
56
+ else
57
+ waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
58
+ eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
59
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
60
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
61
+ )
62
+ end
63
+ result_to_return = waiter_result
64
+
65
+ return result_to_return
66
+ rescue StandardError
67
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
68
+ end
69
+ end
70
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
71
+ # rubocop:enable Layout/EmptyLines
72
+
73
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
74
+ # rubocop:disable Layout/EmptyLines
75
+
76
+
77
+ # Calls {OCI::Oce::OceInstanceClient#create_oce_instance} and then waits for the {OCI::Oce::Models::WorkRequest}
78
+ # to enter the given state(s).
79
+ #
80
+ # @param [OCI::Oce::Models::CreateOceInstanceDetails] create_oce_instance_details Details for the new OceInstance.
81
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Oce::Models::WorkRequest#status}
82
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Oce::OceInstanceClient#create_oce_instance}
83
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
84
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
85
+ # * max_wait_seconds The maximum time to wait, in seconds
86
+ #
87
+ # @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Oce::Models::WorkRequest}
88
+ def create_oce_instance_and_wait_for_state(create_oce_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
89
+ operation_result = @service_client.create_oce_instance(create_oce_instance_details, base_operation_opts)
90
+ use_util = OCI::Oce::Util.respond_to?(:wait_on_work_request)
91
+
92
+ return operation_result if wait_for_states.empty? && !use_util
93
+
94
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
95
+ wait_for_resource_id = operation_result.headers['opc-work-request-id']
96
+
97
+ begin
98
+ if use_util
99
+ waiter_result = OCI::Oce::Util.wait_on_work_request(
100
+ @service_client,
101
+ wait_for_resource_id,
102
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
103
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
104
+ )
105
+ else
106
+ waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
107
+ eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
108
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
109
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
110
+ )
111
+ end
112
+ result_to_return = waiter_result
113
+
114
+ return result_to_return
115
+ rescue StandardError
116
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
117
+ end
118
+ end
119
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
120
+ # rubocop:enable Layout/EmptyLines
121
+
122
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
123
+ # rubocop:disable Layout/EmptyLines
124
+
125
+
126
+ # Calls {OCI::Oce::OceInstanceClient#delete_oce_instance} and then waits for the {OCI::Oce::Models::WorkRequest}
127
+ # to enter the given state(s).
128
+ #
129
+ # @param [String] oce_instance_id unique OceInstance identifier
130
+ # @param [OCI::Oce::Models::DeleteOceInstanceDetails] delete_oce_instance_details The information about resource to be deleted.
131
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Oce::Models::WorkRequest#status}
132
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Oce::OceInstanceClient#delete_oce_instance}
133
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
134
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
135
+ # * max_wait_seconds The maximum time to wait, in seconds
136
+ #
137
+ # @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Oce::Models::WorkRequest}
138
+ def delete_oce_instance_and_wait_for_state(oce_instance_id, delete_oce_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
139
+ operation_result = @service_client.delete_oce_instance(oce_instance_id, delete_oce_instance_details, base_operation_opts)
140
+ use_util = OCI::Oce::Util.respond_to?(:wait_on_work_request)
141
+
142
+ return operation_result if wait_for_states.empty? && !use_util
143
+
144
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
145
+ wait_for_resource_id = operation_result.headers['opc-work-request-id']
146
+
147
+ begin
148
+ if use_util
149
+ waiter_result = OCI::Oce::Util.wait_on_work_request(
150
+ @service_client,
151
+ wait_for_resource_id,
152
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
153
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
154
+ )
155
+ else
156
+ waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
157
+ eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
158
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
159
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
160
+ )
161
+ end
162
+ result_to_return = waiter_result
163
+
164
+ return result_to_return
165
+ rescue StandardError
166
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
167
+ end
168
+ end
169
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
170
+ # rubocop:enable Layout/EmptyLines
171
+
172
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
173
+ # rubocop:disable Layout/EmptyLines
174
+
175
+
176
+ # Calls {OCI::Oce::OceInstanceClient#update_oce_instance} and then waits for the {OCI::Oce::Models::WorkRequest}
177
+ # to enter the given state(s).
178
+ #
179
+ # @param [String] oce_instance_id unique OceInstance identifier
180
+ # @param [OCI::Oce::Models::UpdateOceInstanceDetails] update_oce_instance_details The information to be updated.
181
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Oce::Models::WorkRequest#status}
182
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Oce::OceInstanceClient#update_oce_instance}
183
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
184
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
185
+ # * max_wait_seconds The maximum time to wait, in seconds
186
+ #
187
+ # @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Oce::Models::WorkRequest}
188
+ def update_oce_instance_and_wait_for_state(oce_instance_id, update_oce_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
189
+ operation_result = @service_client.update_oce_instance(oce_instance_id, update_oce_instance_details, base_operation_opts)
190
+ use_util = OCI::Oce::Util.respond_to?(:wait_on_work_request)
191
+
192
+ return operation_result if wait_for_states.empty? && !use_util
193
+
194
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
195
+ wait_for_resource_id = operation_result.headers['opc-work-request-id']
196
+
197
+ begin
198
+ if use_util
199
+ waiter_result = OCI::Oce::Util.wait_on_work_request(
200
+ @service_client,
201
+ wait_for_resource_id,
202
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
203
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
204
+ )
205
+ else
206
+ waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
207
+ eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
208
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
209
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
210
+ )
211
+ end
212
+ result_to_return = waiter_result
213
+
214
+ return result_to_return
215
+ rescue StandardError
216
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
217
+ end
218
+ end
219
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
220
+ # rubocop:enable Layout/EmptyLines
221
+ end
222
+ end
223
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,2 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
@@ -0,0 +1,153 @@
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
+ # Properties required to move a Digital Assistant instance from one compartment to another.
8
+ class Oda::Models::ChangeOdaInstanceCompartmentDetails
9
+ # **[Required]** Identifier of the compartment into which the Digital Assistant instance should be moved.
10
+ # @return [String]
11
+ attr_accessor :compartment_id
12
+
13
+ # Attribute mapping from ruby-style variable name to JSON key.
14
+ def self.attribute_map
15
+ {
16
+ # rubocop:disable Style/SymbolLiteral
17
+ 'compartment_id': :'compartmentId'
18
+ # rubocop:enable Style/SymbolLiteral
19
+ }
20
+ end
21
+
22
+ # Attribute type mapping.
23
+ def self.swagger_types
24
+ {
25
+ # rubocop:disable Style/SymbolLiteral
26
+ 'compartment_id': :'String'
27
+ # rubocop:enable Style/SymbolLiteral
28
+ }
29
+ end
30
+
31
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
32
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
33
+
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
43
+
44
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
45
+
46
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
47
+
48
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
49
+ end
50
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
51
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
52
+
53
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
54
+
55
+
56
+ # Checks equality by comparing each attribute.
57
+ # @param [Object] other the other object to be compared
58
+ def ==(other)
59
+ return true if equal?(other)
60
+
61
+ self.class == other.class &&
62
+ compartment_id == other.compartment_id
63
+ end
64
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
65
+
66
+ # @see the `==` method
67
+ # @param [Object] other the other object to be compared
68
+ def eql?(other)
69
+ self == other
70
+ end
71
+
72
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
73
+
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [compartment_id].hash
79
+ end
80
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
81
+
82
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
83
+
84
+
85
+ # Builds the object from hash
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ # @return [Object] Returns the model itself
88
+ def build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+
91
+ self.class.swagger_types.each_pair do |key, type|
92
+ if type =~ /^Array<(.*)>/i
93
+ # check to ensure the input is an array given that the the attribute
94
+ # is documented as an array but the input is not
95
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
96
+ public_method("#{key}=").call(
97
+ attributes[self.class.attribute_map[key]]
98
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
99
+ )
100
+ end
101
+ elsif !attributes[self.class.attribute_map[key]].nil?
102
+ public_method("#{key}=").call(
103
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
104
+ )
105
+ end
106
+ # or else data not found in attributes(hash), not an issue as the data can be optional
107
+ end
108
+
109
+ self
110
+ end
111
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
112
+
113
+ # Returns the string representation of the object
114
+ # @return [String] String presentation of the object
115
+ def to_s
116
+ to_hash.to_s
117
+ end
118
+
119
+ # Returns the object in the form of hash
120
+ # @return [Hash] Returns the object in the form of hash
121
+ def to_hash
122
+ hash = {}
123
+ self.class.attribute_map.each_pair do |attr, param|
124
+ value = public_method(attr).call
125
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
126
+
127
+ hash[param] = _to_hash(value)
128
+ end
129
+ hash
130
+ end
131
+
132
+ private
133
+
134
+ # Outputs non-array value in the form of hash
135
+ # For object, use to_hash. Otherwise, just return the value
136
+ # @param [Object] value Any valid value
137
+ # @return [Hash] Returns the value in the form of hash
138
+ def _to_hash(value)
139
+ if value.is_a?(Array)
140
+ value.compact.map { |v| _to_hash(v) }
141
+ elsif value.is_a?(Hash)
142
+ {}.tap do |hash|
143
+ value.each { |k, v| hash[k] = _to_hash(v) }
144
+ end
145
+ elsif value.respond_to? :to_hash
146
+ value.to_hash
147
+ else
148
+ value
149
+ end
150
+ end
151
+ end
152
+ end
153
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,237 @@
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
+ # Properties that are required to create a Digital Assistant instance.
8
+ class Oda::Models::CreateOdaInstanceDetails
9
+ SHAPE_NAME_ENUM = [
10
+ SHAPE_NAME_DEVELOPMENT = 'DEVELOPMENT'.freeze,
11
+ SHAPE_NAME_PRODUCTION = 'PRODUCTION'.freeze
12
+ ].freeze
13
+
14
+ # User-friendly name for the instance. Avoid entering confidential information. You can change this value anytime.
15
+ # @return [String]
16
+ attr_accessor :display_name
17
+
18
+ # Description of the Digital Assistant instance.
19
+ # @return [String]
20
+ attr_accessor :description
21
+
22
+ # **[Required]** Identifier of the compartment.
23
+ # @return [String]
24
+ attr_accessor :compartment_id
25
+
26
+ # **[Required]** Shape or size of the instance.
27
+ # @return [String]
28
+ attr_reader :shape_name
29
+
30
+ # Simple key-value pair that is applied without any predefined name, type or scope. Exists for
31
+ # cross-compatibility only.
32
+ # Example: `{\"bar-key\": \"value\"}`
33
+ #
34
+ # @return [Hash<String, String>]
35
+ attr_accessor :freeform_tags
36
+
37
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
38
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`
39
+ #
40
+ # @return [Hash<String, Hash<String, Object>>]
41
+ attr_accessor :defined_tags
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ # rubocop:disable Style/SymbolLiteral
47
+ 'display_name': :'displayName',
48
+ 'description': :'description',
49
+ 'compartment_id': :'compartmentId',
50
+ 'shape_name': :'shapeName',
51
+ 'freeform_tags': :'freeformTags',
52
+ 'defined_tags': :'definedTags'
53
+ # rubocop:enable Style/SymbolLiteral
54
+ }
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.swagger_types
59
+ {
60
+ # rubocop:disable Style/SymbolLiteral
61
+ 'display_name': :'String',
62
+ 'description': :'String',
63
+ 'compartment_id': :'String',
64
+ 'shape_name': :'String',
65
+ 'freeform_tags': :'Hash<String, String>',
66
+ 'defined_tags': :'Hash<String, Hash<String, Object>>'
67
+ # rubocop:enable Style/SymbolLiteral
68
+ }
69
+ end
70
+
71
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
72
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
73
+
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
78
+ # @option attributes [String] :description The value to assign to the {#description} property
79
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
80
+ # @option attributes [String] :shape_name The value to assign to the {#shape_name} property
81
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
82
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
83
+ def initialize(attributes = {})
84
+ return unless attributes.is_a?(Hash)
85
+
86
+ # convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
88
+
89
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
90
+
91
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
92
+
93
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
94
+
95
+ self.description = attributes[:'description'] if attributes[:'description']
96
+
97
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
98
+
99
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
100
+
101
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
102
+
103
+ self.shape_name = attributes[:'shapeName'] if attributes[:'shapeName']
104
+
105
+ raise 'You cannot provide both :shapeName and :shape_name' if attributes.key?(:'shapeName') && attributes.key?(:'shape_name')
106
+
107
+ self.shape_name = attributes[:'shape_name'] if attributes[:'shape_name']
108
+
109
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
110
+
111
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
112
+
113
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
114
+
115
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
116
+
117
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
118
+
119
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
120
+ end
121
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
122
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
123
+
124
+ # Custom attribute writer method checking allowed values (enum).
125
+ # @param [Object] shape_name Object to be assigned
126
+ def shape_name=(shape_name)
127
+ raise "Invalid value for 'shape_name': this must be one of the values in SHAPE_NAME_ENUM." if shape_name && !SHAPE_NAME_ENUM.include?(shape_name)
128
+
129
+ @shape_name = shape_name
130
+ end
131
+
132
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
133
+
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param [Object] other the other object to be compared
137
+ def ==(other)
138
+ return true if equal?(other)
139
+
140
+ self.class == other.class &&
141
+ display_name == other.display_name &&
142
+ description == other.description &&
143
+ compartment_id == other.compartment_id &&
144
+ shape_name == other.shape_name &&
145
+ freeform_tags == other.freeform_tags &&
146
+ defined_tags == other.defined_tags
147
+ end
148
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
149
+
150
+ # @see the `==` method
151
+ # @param [Object] other the other object to be compared
152
+ def eql?(other)
153
+ self == other
154
+ end
155
+
156
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
157
+
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Fixnum] Hash code
161
+ def hash
162
+ [display_name, description, compartment_id, shape_name, freeform_tags, defined_tags].hash
163
+ end
164
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
165
+
166
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
167
+
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+
175
+ self.class.swagger_types.each_pair do |key, type|
176
+ if type =~ /^Array<(.*)>/i
177
+ # check to ensure the input is an array given that the the attribute
178
+ # is documented as an array but the input is not
179
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
180
+ public_method("#{key}=").call(
181
+ attributes[self.class.attribute_map[key]]
182
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
183
+ )
184
+ end
185
+ elsif !attributes[self.class.attribute_map[key]].nil?
186
+ public_method("#{key}=").call(
187
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
188
+ )
189
+ end
190
+ # or else data not found in attributes(hash), not an issue as the data can be optional
191
+ end
192
+
193
+ self
194
+ end
195
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
196
+
197
+ # Returns the string representation of the object
198
+ # @return [String] String presentation of the object
199
+ def to_s
200
+ to_hash.to_s
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = public_method(attr).call
209
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ private
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+ end
236
+ end
237
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength