oci 2.0.4 → 2.0.5

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 (296) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +3 -3
  3. data/README.md +72 -6
  4. data/lib/oci.rb +1 -1
  5. data/lib/oci/api_client.rb +1 -1
  6. data/lib/oci/audit/audit.rb +1 -1
  7. data/lib/oci/audit/audit_client.rb +1 -1
  8. data/lib/oci/audit/models/audit_event.rb +4 -4
  9. data/lib/oci/audit/models/configuration.rb +4 -4
  10. data/lib/oci/audit/models/update_configuration_details.rb +4 -4
  11. data/lib/oci/audit/util.rb +2 -1
  12. data/lib/oci/config.rb +1 -1
  13. data/lib/oci/config_file_loader.rb +1 -1
  14. data/lib/oci/core/blockstorage_client.rb +1 -1
  15. data/lib/oci/core/compute_client.rb +4 -2
  16. data/lib/oci/core/core.rb +2 -1
  17. data/lib/oci/core/models/attach_boot_volume_details.rb +4 -4
  18. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +4 -4
  19. data/lib/oci/core/models/attach_vnic_details.rb +4 -4
  20. data/lib/oci/core/models/attach_volume_details.rb +4 -4
  21. data/lib/oci/core/models/boot_volume.rb +4 -4
  22. data/lib/oci/core/models/boot_volume_attachment.rb +4 -4
  23. data/lib/oci/core/models/bulk_add_virtual_circuit_public_prefixes_details.rb +4 -4
  24. data/lib/oci/core/models/bulk_delete_virtual_circuit_public_prefixes_details.rb +4 -4
  25. data/lib/oci/core/models/capture_console_history_details.rb +36 -5
  26. data/lib/oci/core/models/connect_local_peering_gateways_details.rb +4 -4
  27. data/lib/oci/core/models/console_history.rb +36 -6
  28. data/lib/oci/core/models/cpe.rb +4 -4
  29. data/lib/oci/core/models/create_cpe_details.rb +4 -4
  30. data/lib/oci/core/models/create_cross_connect_details.rb +4 -4
  31. data/lib/oci/core/models/create_cross_connect_group_details.rb +4 -4
  32. data/lib/oci/core/models/create_dhcp_details.rb +36 -5
  33. data/lib/oci/core/models/create_drg_attachment_details.rb +4 -4
  34. data/lib/oci/core/models/create_drg_details.rb +4 -4
  35. data/lib/oci/core/models/create_image_details.rb +69 -8
  36. data/lib/oci/core/models/create_instance_console_connection_details.rb +36 -5
  37. data/lib/oci/core/models/create_internet_gateway_details.rb +4 -4
  38. data/lib/oci/core/models/create_ip_sec_connection_details.rb +4 -4
  39. data/lib/oci/core/models/create_local_peering_gateway_details.rb +4 -4
  40. data/lib/oci/core/models/create_private_ip_details.rb +36 -5
  41. data/lib/oci/core/models/create_route_table_details.rb +36 -5
  42. data/lib/oci/core/models/create_security_list_details.rb +36 -5
  43. data/lib/oci/core/models/create_subnet_details.rb +36 -5
  44. data/lib/oci/core/models/create_vcn_details.rb +39 -8
  45. data/lib/oci/core/models/create_virtual_circuit_details.rb +4 -4
  46. data/lib/oci/core/models/create_virtual_circuit_public_prefix_details.rb +4 -4
  47. data/lib/oci/core/models/create_vnic_details.rb +4 -4
  48. data/lib/oci/core/models/create_volume_backup_details.rb +36 -5
  49. data/lib/oci/core/models/create_volume_details.rb +36 -5
  50. data/lib/oci/core/models/cross_connect.rb +4 -4
  51. data/lib/oci/core/models/cross_connect_group.rb +4 -4
  52. data/lib/oci/core/models/cross_connect_location.rb +4 -4
  53. data/lib/oci/core/models/cross_connect_mapping.rb +4 -4
  54. data/lib/oci/core/models/cross_connect_port_speed_shape.rb +4 -4
  55. data/lib/oci/core/models/cross_connect_status.rb +4 -4
  56. data/lib/oci/core/models/delete_virtual_circuit_public_prefix_details.rb +4 -4
  57. data/lib/oci/core/models/dhcp_dns_option.rb +4 -4
  58. data/lib/oci/core/models/dhcp_option.rb +4 -4
  59. data/lib/oci/core/models/dhcp_options.rb +36 -5
  60. data/lib/oci/core/models/dhcp_search_domain_option.rb +4 -4
  61. data/lib/oci/core/models/drg.rb +4 -4
  62. data/lib/oci/core/models/drg_attachment.rb +4 -4
  63. data/lib/oci/core/models/egress_security_rule.rb +4 -4
  64. data/lib/oci/core/models/export_image_details.rb +4 -4
  65. data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +4 -4
  66. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +4 -4
  67. data/lib/oci/core/models/fast_connect_provider_service.rb +4 -4
  68. data/lib/oci/core/models/i_scsi_volume_attachment.rb +4 -4
  69. data/lib/oci/core/models/icmp_options.rb +4 -4
  70. data/lib/oci/core/models/image.rb +77 -6
  71. data/lib/oci/core/models/image_source_details.rb +32 -5
  72. data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +8 -5
  73. data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +8 -5
  74. data/lib/oci/core/models/ingress_security_rule.rb +4 -4
  75. data/lib/oci/core/models/instance.rb +77 -5
  76. data/lib/oci/core/models/instance_console_connection.rb +52 -8
  77. data/lib/oci/core/models/instance_credentials.rb +4 -4
  78. data/lib/oci/core/models/instance_source_details.rb +4 -4
  79. data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +4 -4
  80. data/lib/oci/core/models/instance_source_via_image_details.rb +4 -4
  81. data/lib/oci/core/models/internet_gateway.rb +4 -4
  82. data/lib/oci/core/models/ip_sec_connection.rb +4 -4
  83. data/lib/oci/core/models/ip_sec_connection_device_config.rb +4 -4
  84. data/lib/oci/core/models/ip_sec_connection_device_status.rb +4 -4
  85. data/lib/oci/core/models/launch_instance_details.rb +39 -6
  86. data/lib/oci/core/models/launch_options.rb +239 -0
  87. data/lib/oci/core/models/letter_of_authority.rb +4 -4
  88. data/lib/oci/core/models/local_peering_gateway.rb +4 -4
  89. data/lib/oci/core/models/port_range.rb +4 -4
  90. data/lib/oci/core/models/private_ip.rb +36 -5
  91. data/lib/oci/core/models/route_rule.rb +4 -4
  92. data/lib/oci/core/models/route_table.rb +36 -5
  93. data/lib/oci/core/models/security_list.rb +36 -5
  94. data/lib/oci/core/models/shape.rb +4 -4
  95. data/lib/oci/core/models/subnet.rb +36 -5
  96. data/lib/oci/core/models/tcp_options.rb +4 -4
  97. data/lib/oci/core/models/tunnel_config.rb +4 -4
  98. data/lib/oci/core/models/tunnel_status.rb +4 -4
  99. data/lib/oci/core/models/udp_options.rb +4 -4
  100. data/lib/oci/core/models/update_boot_volume_details.rb +4 -4
  101. data/lib/oci/core/models/update_console_history_details.rb +39 -8
  102. data/lib/oci/core/models/update_cpe_details.rb +4 -4
  103. data/lib/oci/core/models/update_cross_connect_details.rb +4 -4
  104. data/lib/oci/core/models/update_cross_connect_group_details.rb +4 -4
  105. data/lib/oci/core/models/update_dhcp_details.rb +36 -5
  106. data/lib/oci/core/models/update_drg_attachment_details.rb +4 -4
  107. data/lib/oci/core/models/update_drg_details.rb +4 -4
  108. data/lib/oci/core/models/update_image_details.rb +39 -8
  109. data/lib/oci/core/models/update_instance_details.rb +39 -8
  110. data/lib/oci/core/models/update_internet_gateway_details.rb +4 -4
  111. data/lib/oci/core/models/update_ip_sec_connection_details.rb +4 -4
  112. data/lib/oci/core/models/update_local_peering_gateway_details.rb +4 -4
  113. data/lib/oci/core/models/update_private_ip_details.rb +36 -5
  114. data/lib/oci/core/models/update_route_table_details.rb +36 -5
  115. data/lib/oci/core/models/update_security_list_details.rb +36 -5
  116. data/lib/oci/core/models/update_subnet_details.rb +39 -8
  117. data/lib/oci/core/models/update_vcn_details.rb +39 -8
  118. data/lib/oci/core/models/update_virtual_circuit_details.rb +4 -4
  119. data/lib/oci/core/models/update_vnic_details.rb +4 -4
  120. data/lib/oci/core/models/update_volume_backup_details.rb +39 -8
  121. data/lib/oci/core/models/update_volume_details.rb +39 -8
  122. data/lib/oci/core/models/vcn.rb +36 -5
  123. data/lib/oci/core/models/virtual_circuit.rb +4 -4
  124. data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +4 -4
  125. data/lib/oci/core/models/virtual_circuit_public_prefix.rb +4 -4
  126. data/lib/oci/core/models/vnic.rb +4 -4
  127. data/lib/oci/core/models/vnic_attachment.rb +4 -4
  128. data/lib/oci/core/models/volume.rb +36 -5
  129. data/lib/oci/core/models/volume_attachment.rb +4 -4
  130. data/lib/oci/core/models/volume_backup.rb +36 -5
  131. data/lib/oci/core/models/volume_source_details.rb +4 -4
  132. data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +4 -4
  133. data/lib/oci/core/models/volume_source_from_volume_details.rb +4 -4
  134. data/lib/oci/core/util.rb +2 -1
  135. data/lib/oci/core/virtual_network_client.rb +1 -1
  136. data/lib/oci/database/database.rb +1 -1
  137. data/lib/oci/database/database_client.rb +1 -1
  138. data/lib/oci/database/models/backup.rb +4 -4
  139. data/lib/oci/database/models/backup_summary.rb +4 -4
  140. data/lib/oci/database/models/create_backup_details.rb +4 -4
  141. data/lib/oci/database/models/create_data_guard_association_details.rb +4 -4
  142. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +4 -4
  143. data/lib/oci/database/models/create_database_details.rb +4 -4
  144. data/lib/oci/database/models/create_database_from_backup_details.rb +4 -4
  145. data/lib/oci/database/models/create_db_home_details.rb +4 -4
  146. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +4 -4
  147. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +4 -4
  148. data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +4 -4
  149. data/lib/oci/database/models/data_guard_association.rb +4 -4
  150. data/lib/oci/database/models/data_guard_association_summary.rb +4 -4
  151. data/lib/oci/database/models/database.rb +4 -4
  152. data/lib/oci/database/models/database_summary.rb +4 -4
  153. data/lib/oci/database/models/db_backup_config.rb +4 -4
  154. data/lib/oci/database/models/db_home.rb +4 -4
  155. data/lib/oci/database/models/db_home_summary.rb +4 -4
  156. data/lib/oci/database/models/db_node.rb +4 -4
  157. data/lib/oci/database/models/db_node_summary.rb +4 -4
  158. data/lib/oci/database/models/db_system.rb +4 -4
  159. data/lib/oci/database/models/db_system_shape_summary.rb +4 -4
  160. data/lib/oci/database/models/db_system_summary.rb +4 -4
  161. data/lib/oci/database/models/db_version_summary.rb +4 -4
  162. data/lib/oci/database/models/failover_data_guard_association_details.rb +4 -4
  163. data/lib/oci/database/models/launch_db_system_details.rb +4 -4
  164. data/lib/oci/database/models/patch.rb +4 -4
  165. data/lib/oci/database/models/patch_details.rb +4 -4
  166. data/lib/oci/database/models/patch_history_entry.rb +4 -4
  167. data/lib/oci/database/models/patch_history_entry_summary.rb +4 -4
  168. data/lib/oci/database/models/patch_summary.rb +4 -4
  169. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +4 -4
  170. data/lib/oci/database/models/restore_database_details.rb +4 -4
  171. data/lib/oci/database/models/switchover_data_guard_association_details.rb +4 -4
  172. data/lib/oci/database/models/update_database_details.rb +4 -4
  173. data/lib/oci/database/models/update_db_home_details.rb +4 -4
  174. data/lib/oci/database/models/update_db_system_details.rb +4 -4
  175. data/lib/oci/database/util.rb +2 -1
  176. data/lib/oci/errors.rb +1 -1
  177. data/lib/oci/global_context.rb +1 -1
  178. data/lib/oci/identity/identity.rb +9 -1
  179. data/lib/oci/identity/identity_client.rb +339 -1
  180. data/lib/oci/identity/models/add_user_to_group_details.rb +4 -4
  181. data/lib/oci/identity/models/api_key.rb +4 -4
  182. data/lib/oci/identity/models/availability_domain.rb +4 -4
  183. data/lib/oci/identity/models/compartment.rb +34 -8
  184. data/lib/oci/identity/models/create_api_key_details.rb +4 -4
  185. data/lib/oci/identity/models/create_compartment_details.rb +34 -8
  186. data/lib/oci/identity/models/create_customer_secret_key_details.rb +4 -4
  187. data/lib/oci/identity/models/create_group_details.rb +34 -8
  188. data/lib/oci/identity/models/create_identity_provider_details.rb +34 -8
  189. data/lib/oci/identity/models/create_idp_group_mapping_details.rb +4 -4
  190. data/lib/oci/identity/models/create_policy_details.rb +34 -8
  191. data/lib/oci/identity/models/create_region_subscription_details.rb +4 -4
  192. data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +11 -5
  193. data/lib/oci/identity/models/create_swift_password_details.rb +4 -4
  194. data/lib/oci/identity/models/create_tag_details.rb +158 -0
  195. data/lib/oci/identity/models/create_tag_namespace_details.rb +169 -0
  196. data/lib/oci/identity/models/create_user_details.rb +34 -8
  197. data/lib/oci/identity/models/customer_secret_key.rb +4 -4
  198. data/lib/oci/identity/models/customer_secret_key_summary.rb +4 -4
  199. data/lib/oci/identity/models/group.rb +35 -8
  200. data/lib/oci/identity/models/identity_provider.rb +34 -8
  201. data/lib/oci/identity/models/idp_group_mapping.rb +4 -4
  202. data/lib/oci/identity/models/policy.rb +34 -8
  203. data/lib/oci/identity/models/region.rb +4 -4
  204. data/lib/oci/identity/models/region_subscription.rb +4 -4
  205. data/lib/oci/identity/models/saml2_identity_provider.rb +11 -5
  206. data/lib/oci/identity/models/swift_password.rb +4 -4
  207. data/lib/oci/identity/models/tag.rb +228 -0
  208. data/lib/oci/identity/models/tag_namespace.rb +205 -0
  209. data/lib/oci/identity/models/tag_namespace_summary.rb +205 -0
  210. data/lib/oci/identity/models/tag_summary.rb +205 -0
  211. data/lib/oci/identity/models/tenancy.rb +34 -8
  212. data/lib/oci/identity/models/ui_password.rb +4 -4
  213. data/lib/oci/identity/models/update_compartment_details.rb +34 -8
  214. data/lib/oci/identity/models/update_customer_secret_key_details.rb +4 -4
  215. data/lib/oci/identity/models/update_group_details.rb +34 -8
  216. data/lib/oci/identity/models/update_identity_provider_details.rb +34 -8
  217. data/lib/oci/identity/models/update_idp_group_mapping_details.rb +4 -4
  218. data/lib/oci/identity/models/update_policy_details.rb +34 -8
  219. data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +11 -5
  220. data/lib/oci/identity/models/update_state_details.rb +4 -4
  221. data/lib/oci/identity/models/update_swift_password_details.rb +4 -4
  222. data/lib/oci/identity/models/update_tag_details.rb +157 -0
  223. data/lib/oci/identity/models/update_tag_namespace_details.rb +157 -0
  224. data/lib/oci/identity/models/update_user_details.rb +34 -8
  225. data/lib/oci/identity/models/user.rb +35 -8
  226. data/lib/oci/identity/models/user_group_membership.rb +4 -4
  227. data/lib/oci/identity/util.rb +2 -1
  228. data/lib/oci/internal/internal.rb +1 -1
  229. data/lib/oci/internal/util.rb +2 -2
  230. data/lib/oci/load_balancer/load_balancer.rb +1 -1
  231. data/lib/oci/load_balancer/load_balancer_client.rb +1 -1
  232. data/lib/oci/load_balancer/models/backend.rb +4 -4
  233. data/lib/oci/load_balancer/models/backend_details.rb +4 -4
  234. data/lib/oci/load_balancer/models/backend_health.rb +4 -4
  235. data/lib/oci/load_balancer/models/backend_set.rb +4 -4
  236. data/lib/oci/load_balancer/models/backend_set_details.rb +4 -4
  237. data/lib/oci/load_balancer/models/backend_set_health.rb +4 -4
  238. data/lib/oci/load_balancer/models/certificate.rb +4 -4
  239. data/lib/oci/load_balancer/models/certificate_details.rb +4 -4
  240. data/lib/oci/load_balancer/models/create_backend_details.rb +4 -4
  241. data/lib/oci/load_balancer/models/create_backend_set_details.rb +4 -4
  242. data/lib/oci/load_balancer/models/create_certificate_details.rb +4 -4
  243. data/lib/oci/load_balancer/models/create_listener_details.rb +4 -4
  244. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +4 -4
  245. data/lib/oci/load_balancer/models/health_check_result.rb +4 -4
  246. data/lib/oci/load_balancer/models/health_checker.rb +4 -4
  247. data/lib/oci/load_balancer/models/health_checker_details.rb +4 -4
  248. data/lib/oci/load_balancer/models/ip_address.rb +4 -4
  249. data/lib/oci/load_balancer/models/listener.rb +4 -4
  250. data/lib/oci/load_balancer/models/listener_details.rb +4 -4
  251. data/lib/oci/load_balancer/models/load_balancer.rb +4 -4
  252. data/lib/oci/load_balancer/models/load_balancer_health.rb +4 -4
  253. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +4 -4
  254. data/lib/oci/load_balancer/models/load_balancer_policy.rb +4 -4
  255. data/lib/oci/load_balancer/models/load_balancer_protocol.rb +4 -4
  256. data/lib/oci/load_balancer/models/load_balancer_shape.rb +4 -4
  257. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +4 -4
  258. data/lib/oci/load_balancer/models/ssl_configuration.rb +4 -4
  259. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +4 -4
  260. data/lib/oci/load_balancer/models/update_backend_details.rb +4 -4
  261. data/lib/oci/load_balancer/models/update_backend_set_details.rb +4 -4
  262. data/lib/oci/load_balancer/models/update_health_checker_details.rb +4 -4
  263. data/lib/oci/load_balancer/models/update_listener_details.rb +4 -4
  264. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +4 -4
  265. data/lib/oci/load_balancer/models/work_request.rb +4 -4
  266. data/lib/oci/load_balancer/models/work_request_error.rb +4 -4
  267. data/lib/oci/load_balancer/util.rb +1 -1
  268. data/lib/oci/object_storage/models/bucket.rb +4 -4
  269. data/lib/oci/object_storage/models/bucket_summary.rb +4 -4
  270. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +4 -4
  271. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +4 -4
  272. data/lib/oci/object_storage/models/create_bucket_details.rb +4 -4
  273. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +4 -4
  274. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +4 -4
  275. data/lib/oci/object_storage/models/list_objects.rb +4 -4
  276. data/lib/oci/object_storage/models/multipart_upload.rb +4 -4
  277. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +4 -4
  278. data/lib/oci/object_storage/models/namespace_metadata.rb +4 -4
  279. data/lib/oci/object_storage/models/object_summary.rb +4 -4
  280. data/lib/oci/object_storage/models/preauthenticated_request.rb +4 -4
  281. data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +4 -4
  282. data/lib/oci/object_storage/models/rename_object_details.rb +4 -4
  283. data/lib/oci/object_storage/models/restore_objects_details.rb +4 -4
  284. data/lib/oci/object_storage/models/update_bucket_details.rb +4 -4
  285. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +4 -4
  286. data/lib/oci/object_storage/object_storage.rb +1 -1
  287. data/lib/oci/object_storage/object_storage_client.rb +1 -1
  288. data/lib/oci/object_storage/util.rb +2 -1
  289. data/lib/oci/regions.rb +1 -1
  290. data/lib/oci/response.rb +1 -1
  291. data/lib/oci/response_headers.rb +1 -1
  292. data/lib/oci/signer.rb +1 -1
  293. data/lib/oci/version.rb +2 -2
  294. data/lib/oci/waiter.rb +21 -5
  295. data/lib/oraclebmc.rb +1 -1
  296. metadata +11 -2
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -64,10 +64,10 @@ module OCI
64
64
  # check to ensure the input is an array given that the the attribute
65
65
  # is documented as an array but the input is not
66
66
  if attributes[self.class.attribute_map[key]].is_a?(Array)
67
- self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
67
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
68
68
  end
69
69
  elsif !attributes[self.class.attribute_map[key]].nil?
70
- self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
70
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
71
71
  end # or else data not found in attributes(hash), not an issue as the data can be optional
72
72
  end
73
73
 
@@ -85,7 +85,7 @@ module OCI
85
85
  def to_hash
86
86
  hash = {}
87
87
  self.class.attribute_map.each_pair do |attr, param|
88
- value = public_send(attr)
88
+ value = public_method(attr).call
89
89
  next if value.nil? && !instance_variable_defined?("@#{attr}")
90
90
  hash[param] = _to_hash(value)
91
91
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -33,6 +33,18 @@ module OCI
33
33
  # @return [DateTime]
34
34
  attr_accessor :version_date
35
35
 
36
+ # Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
37
+ # Example: `{\"bar-key\": \"value\"}`
38
+ #
39
+ # @return [Hash<String, String>]
40
+ attr_accessor :freeform_tags
41
+
42
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
43
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
44
+ #
45
+ # @return [Hash<String, Hash<String, Object>>]
46
+ attr_accessor :defined_tags
47
+
36
48
 
37
49
  # Initializes the object
38
50
  # @param [Hash] attributes Model attributes in the form of hash
@@ -62,6 +74,14 @@ module OCI
62
74
  self.version_date = attributes[:'versionDate']
63
75
  end
64
76
 
77
+ if attributes[:'freeformTags']
78
+ self.freeform_tags = attributes[:'freeformTags']
79
+ end
80
+
81
+ if attributes[:'definedTags']
82
+ self.defined_tags = attributes[:'definedTags']
83
+ end
84
+
65
85
  end
66
86
 
67
87
  # Checks equality by comparing each attribute.
@@ -73,7 +93,9 @@ module OCI
73
93
  name == other_object.name &&
74
94
  statements == other_object.statements &&
75
95
  description == other_object.description &&
76
- version_date == other_object.version_date
96
+ version_date == other_object.version_date &&
97
+ freeform_tags == other_object.freeform_tags &&
98
+ defined_tags == other_object.defined_tags
77
99
  end
78
100
 
79
101
  # @see the `==` method
@@ -85,7 +107,7 @@ module OCI
85
107
  # Calculates hash code according to all attributes.
86
108
  # @return [Fixnum] Hash code
87
109
  def hash
88
- [compartment_id, name, statements, description, version_date].hash
110
+ [compartment_id, name, statements, description, version_date, freeform_tags, defined_tags].hash
89
111
  end
90
112
 
91
113
  # Builds the object from hash
@@ -98,10 +120,10 @@ module OCI
98
120
  # check to ensure the input is an array given that the the attribute
99
121
  # is documented as an array but the input is not
100
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
101
- self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
123
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
102
124
  end
103
125
  elsif !attributes[self.class.attribute_map[key]].nil?
104
- self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
126
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
105
127
  end # or else data not found in attributes(hash), not an issue as the data can be optional
106
128
  end
107
129
 
@@ -119,7 +141,7 @@ module OCI
119
141
  def to_hash
120
142
  hash = {}
121
143
  self.class.attribute_map.each_pair do |attr, param|
122
- value = public_send(attr)
144
+ value = public_method(attr).call
123
145
  next if value.nil? && !instance_variable_defined?("@#{attr}")
124
146
  hash[param] = _to_hash(value)
125
147
  end
@@ -155,7 +177,9 @@ module OCI
155
177
  :'name' => :'name',
156
178
  :'statements' => :'statements',
157
179
  :'description' => :'description',
158
- :'version_date' => :'versionDate'
180
+ :'version_date' => :'versionDate',
181
+ :'freeform_tags' => :'freeformTags',
182
+ :'defined_tags' => :'definedTags'
159
183
  }
160
184
  end
161
185
 
@@ -166,7 +190,9 @@ module OCI
166
190
  :'name' => :'String',
167
191
  :'statements' => :'Array<String>',
168
192
  :'description' => :'String',
169
- :'version_date' => :'DateTime'
193
+ :'version_date' => :'DateTime',
194
+ :'freeform_tags' => :'Hash<String, String>',
195
+ :'defined_tags' => :'Hash<String, Hash<String, Object>>'
170
196
  }
171
197
  end
172
198
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -61,10 +61,10 @@ module OCI
61
61
  # check to ensure the input is an array given that the the attribute
62
62
  # is documented as an array but the input is not
63
63
  if attributes[self.class.attribute_map[key]].is_a?(Array)
64
- self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
64
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
65
65
  end
66
66
  elsif !attributes[self.class.attribute_map[key]].nil?
67
- self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
67
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
68
68
  end # or else data not found in attributes(hash), not an issue as the data can be optional
69
69
  end
70
70
 
@@ -82,7 +82,7 @@ module OCI
82
82
  def to_hash
83
83
  hash = {}
84
84
  self.class.attribute_map.each_pair do |attr, param|
85
- value = public_send(attr)
85
+ value = public_method(attr).call
86
86
  next if value.nil? && !instance_variable_defined?("@#{attr}")
87
87
  hash[param] = _to_hash(value)
88
88
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
  require_relative 'create_identity_provider_details'
@@ -49,6 +49,8 @@ module OCI
49
49
  description == other_object.description &&
50
50
  product_type == other_object.product_type &&
51
51
  protocol == other_object.protocol &&
52
+ freeform_tags == other_object.freeform_tags &&
53
+ defined_tags == other_object.defined_tags &&
52
54
  metadata_url == other_object.metadata_url &&
53
55
  metadata == other_object.metadata
54
56
  end
@@ -62,7 +64,7 @@ module OCI
62
64
  # Calculates hash code according to all attributes.
63
65
  # @return [Fixnum] Hash code
64
66
  def hash
65
- [compartment_id, name, description, product_type, protocol, metadata_url, metadata].hash
67
+ [compartment_id, name, description, product_type, protocol, freeform_tags, defined_tags, metadata_url, metadata].hash
66
68
  end
67
69
 
68
70
  # Builds the object from hash
@@ -75,10 +77,10 @@ module OCI
75
77
  # check to ensure the input is an array given that the the attribute
76
78
  # is documented as an array but the input is not
77
79
  if attributes[self.class.attribute_map[key]].is_a?(Array)
78
- self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
80
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
79
81
  end
80
82
  elsif !attributes[self.class.attribute_map[key]].nil?
81
- self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
83
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
82
84
  end # or else data not found in attributes(hash), not an issue as the data can be optional
83
85
  end
84
86
 
@@ -96,7 +98,7 @@ module OCI
96
98
  def to_hash
97
99
  hash = {}
98
100
  self.class.attribute_map.each_pair do |attr, param|
99
- value = public_send(attr)
101
+ value = public_method(attr).call
100
102
  next if value.nil? && !instance_variable_defined?("@#{attr}")
101
103
  hash[param] = _to_hash(value)
102
104
  end
@@ -133,6 +135,8 @@ module OCI
133
135
  :'description' => :'description',
134
136
  :'product_type' => :'productType',
135
137
  :'protocol' => :'protocol',
138
+ :'freeform_tags' => :'freeformTags',
139
+ :'defined_tags' => :'definedTags',
136
140
  :'metadata_url' => :'metadataUrl',
137
141
  :'metadata' => :'metadata'
138
142
  }
@@ -146,6 +150,8 @@ module OCI
146
150
  :'description' => :'String',
147
151
  :'product_type' => :'String',
148
152
  :'protocol' => :'String',
153
+ :'freeform_tags' => :'Hash<String, String>',
154
+ :'defined_tags' => :'Hash<String, Hash<String, Object>>',
149
155
  :'metadata_url' => :'String',
150
156
  :'metadata' => :'String'
151
157
  }
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -54,10 +54,10 @@ module OCI
54
54
  # check to ensure the input is an array given that the the attribute
55
55
  # is documented as an array but the input is not
56
56
  if attributes[self.class.attribute_map[key]].is_a?(Array)
57
- self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
57
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
58
58
  end
59
59
  elsif !attributes[self.class.attribute_map[key]].nil?
60
- self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
60
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
61
61
  end # or else data not found in attributes(hash), not an issue as the data can be optional
62
62
  end
63
63
 
@@ -75,7 +75,7 @@ module OCI
75
75
  def to_hash
76
76
  hash = {}
77
77
  self.class.attribute_map.each_pair do |attr, param|
78
- value = public_send(attr)
78
+ value = public_method(attr).call
79
79
  next if value.nil? && !instance_variable_defined?("@#{attr}")
80
80
  hash[param] = _to_hash(value)
81
81
  end
@@ -0,0 +1,158 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Identity::Models::CreateTagDetails
7
+ # The name of the tag which must be unique across all tags in the tagNamespace and cannot be changed.
8
+ #
9
+ # @return [String]
10
+ attr_accessor :name
11
+
12
+ # The description of the tag.
13
+ # @return [String]
14
+ attr_accessor :description
15
+
16
+ # Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
17
+ # Example: `{\"bar-key\": \"value\"}`
18
+ #
19
+ # @return [Hash<String, String>]
20
+ attr_accessor :freeform_tags
21
+
22
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
23
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
24
+ #
25
+ # @return [Hash<String, Hash<String, Object>>]
26
+ attr_accessor :defined_tags
27
+
28
+
29
+ # Initializes the object
30
+ # @param [Hash] attributes Model attributes in the form of hash
31
+ def initialize(attributes = {})
32
+ return unless attributes.is_a?(Hash)
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
36
+
37
+ if attributes[:'name']
38
+ self.name = attributes[:'name']
39
+ end
40
+
41
+ if attributes[:'description']
42
+ self.description = attributes[:'description']
43
+ end
44
+
45
+ if attributes[:'freeformTags']
46
+ self.freeform_tags = attributes[:'freeformTags']
47
+ end
48
+
49
+ if attributes[:'definedTags']
50
+ self.defined_tags = attributes[:'definedTags']
51
+ end
52
+
53
+ end
54
+
55
+ # Checks equality by comparing each attribute.
56
+ # @param [Object] other_object to be compared
57
+ def ==(other_object)
58
+ return true if self.equal?(other_object)
59
+ self.class == other_object.class &&
60
+ name == other_object.name &&
61
+ description == other_object.description &&
62
+ freeform_tags == other_object.freeform_tags &&
63
+ defined_tags == other_object.defined_tags
64
+ end
65
+
66
+ # @see the `==` method
67
+ # @param [Object] other_object to be compared
68
+ def eql?(other_object)
69
+ self == other_object
70
+ end
71
+
72
+ # Calculates hash code according to all attributes.
73
+ # @return [Fixnum] Hash code
74
+ def hash
75
+ [name, description, freeform_tags, defined_tags].hash
76
+ end
77
+
78
+ # Builds the object from hash
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ # @return [Object] Returns the model itself
81
+ def build_from_hash(attributes)
82
+ return nil unless attributes.is_a?(Hash)
83
+ self.class.swagger_types.each_pair do |key, type|
84
+ if type =~ /^Array<(.*)>/i
85
+ # check to ensure the input is an array given that the the attribute
86
+ # is documented as an array but the input is not
87
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
88
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
89
+ end
90
+ elsif !attributes[self.class.attribute_map[key]].nil?
91
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
92
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
93
+ end
94
+
95
+ self
96
+ end
97
+
98
+ # Returns the string representation of the object
99
+ # @return [String] String presentation of the object
100
+ def to_s
101
+ to_hash.to_s
102
+ end
103
+
104
+ # Returns the object in the form of hash
105
+ # @return [Hash] Returns the object in the form of hash
106
+ def to_hash
107
+ hash = {}
108
+ self.class.attribute_map.each_pair do |attr, param|
109
+ value = public_method(attr).call
110
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
111
+ hash[param] = _to_hash(value)
112
+ end
113
+ hash
114
+ end
115
+
116
+ private
117
+
118
+ # Outputs non-array value in the form of hash
119
+ # For object, use to_hash. Otherwise, just return the value
120
+ # @param [Object] value Any valid value
121
+ # @return [Hash] Returns the value in the form of hash
122
+ def _to_hash(value)
123
+ if value.is_a?(Array)
124
+ value.compact.map{ |v| _to_hash(v) }
125
+ elsif value.is_a?(Hash)
126
+ {}.tap do |hash|
127
+ value.each { |k, v| hash[k] = _to_hash(v) }
128
+ end
129
+ elsif value.respond_to? :to_hash
130
+ value.to_hash
131
+ else
132
+ value
133
+ end
134
+ end
135
+
136
+
137
+
138
+ # Attribute mapping from ruby-style variable name to JSON key.
139
+ def self.attribute_map
140
+ {
141
+ :'name' => :'name',
142
+ :'description' => :'description',
143
+ :'freeform_tags' => :'freeformTags',
144
+ :'defined_tags' => :'definedTags'
145
+ }
146
+ end
147
+
148
+ # Attribute type mapping.
149
+ def self.swagger_types
150
+ {
151
+ :'name' => :'String',
152
+ :'description' => :'String',
153
+ :'freeform_tags' => :'Hash<String, String>',
154
+ :'defined_tags' => :'Hash<String, Hash<String, Object>>'
155
+ }
156
+ end
157
+ end
158
+ end
@@ -0,0 +1,169 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Identity::Models::CreateTagNamespaceDetails
7
+ # The OCID of the tenancy containing the user.
8
+ # @return [String]
9
+ attr_accessor :compartment_id
10
+
11
+ # The name of the tagNamespace. It must be unique across all tagNamespaces in the tenancy and cannot be changed.
12
+ #
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # The description of the tagNamespace.
17
+ # @return [String]
18
+ attr_accessor :description
19
+
20
+ # Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
21
+ # Example: `{\"bar-key\": \"value\"}`
22
+ #
23
+ # @return [Hash<String, String>]
24
+ attr_accessor :freeform_tags
25
+
26
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
27
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
28
+ #
29
+ # @return [Hash<String, Hash<String, Object>>]
30
+ attr_accessor :defined_tags
31
+
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
40
+
41
+ if attributes[:'compartmentId']
42
+ self.compartment_id = attributes[:'compartmentId']
43
+ end
44
+
45
+ if attributes[:'name']
46
+ self.name = attributes[:'name']
47
+ end
48
+
49
+ if attributes[:'description']
50
+ self.description = attributes[:'description']
51
+ end
52
+
53
+ if attributes[:'freeformTags']
54
+ self.freeform_tags = attributes[:'freeformTags']
55
+ end
56
+
57
+ if attributes[:'definedTags']
58
+ self.defined_tags = attributes[:'definedTags']
59
+ end
60
+
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] other_object to be compared
65
+ def ==(other_object)
66
+ return true if self.equal?(other_object)
67
+ self.class == other_object.class &&
68
+ compartment_id == other_object.compartment_id &&
69
+ name == other_object.name &&
70
+ description == other_object.description &&
71
+ freeform_tags == other_object.freeform_tags &&
72
+ defined_tags == other_object.defined_tags
73
+ end
74
+
75
+ # @see the `==` method
76
+ # @param [Object] other_object to be compared
77
+ def eql?(other_object)
78
+ self == other_object
79
+ end
80
+
81
+ # Calculates hash code according to all attributes.
82
+ # @return [Fixnum] Hash code
83
+ def hash
84
+ [compartment_id, name, description, freeform_tags, defined_tags].hash
85
+ end
86
+
87
+ # Builds the object from hash
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ # @return [Object] Returns the model itself
90
+ def build_from_hash(attributes)
91
+ return nil unless attributes.is_a?(Hash)
92
+ self.class.swagger_types.each_pair do |key, type|
93
+ if type =~ /^Array<(.*)>/i
94
+ # check to ensure the input is an array given that the the attribute
95
+ # is documented as an array but the input is not
96
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
97
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
98
+ end
99
+ elsif !attributes[self.class.attribute_map[key]].nil?
100
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
101
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
102
+ end
103
+
104
+ self
105
+ end
106
+
107
+ # Returns the string representation of the object
108
+ # @return [String] String presentation of the object
109
+ def to_s
110
+ to_hash.to_s
111
+ end
112
+
113
+ # Returns the object in the form of hash
114
+ # @return [Hash] Returns the object in the form of hash
115
+ def to_hash
116
+ hash = {}
117
+ self.class.attribute_map.each_pair do |attr, param|
118
+ value = public_method(attr).call
119
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
120
+ hash[param] = _to_hash(value)
121
+ end
122
+ hash
123
+ end
124
+
125
+ private
126
+
127
+ # Outputs non-array value in the form of hash
128
+ # For object, use to_hash. Otherwise, just return the value
129
+ # @param [Object] value Any valid value
130
+ # @return [Hash] Returns the value in the form of hash
131
+ def _to_hash(value)
132
+ if value.is_a?(Array)
133
+ value.compact.map{ |v| _to_hash(v) }
134
+ elsif value.is_a?(Hash)
135
+ {}.tap do |hash|
136
+ value.each { |k, v| hash[k] = _to_hash(v) }
137
+ end
138
+ elsif value.respond_to? :to_hash
139
+ value.to_hash
140
+ else
141
+ value
142
+ end
143
+ end
144
+
145
+
146
+
147
+ # Attribute mapping from ruby-style variable name to JSON key.
148
+ def self.attribute_map
149
+ {
150
+ :'compartment_id' => :'compartmentId',
151
+ :'name' => :'name',
152
+ :'description' => :'description',
153
+ :'freeform_tags' => :'freeformTags',
154
+ :'defined_tags' => :'definedTags'
155
+ }
156
+ end
157
+
158
+ # Attribute type mapping.
159
+ def self.swagger_types
160
+ {
161
+ :'compartment_id' => :'String',
162
+ :'name' => :'String',
163
+ :'description' => :'String',
164
+ :'freeform_tags' => :'Hash<String, String>',
165
+ :'defined_tags' => :'Hash<String, Hash<String, Object>>'
166
+ }
167
+ end
168
+ end
169
+ end