oci 2.0.7 → 2.0.8

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 (297) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/api_client.rb +21 -11
  5. data/lib/oci/audit/models/audit_event.rb +133 -19
  6. data/lib/oci/audit/models/configuration.rb +7 -1
  7. data/lib/oci/audit/models/update_configuration_details.rb +7 -1
  8. data/lib/oci/base_signer.rb +1 -2
  9. data/lib/oci/core/models/attach_boot_volume_details.rb +21 -3
  10. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +11 -5
  11. data/lib/oci/core/models/attach_vnic_details.rb +28 -4
  12. data/lib/oci/core/models/attach_volume_details.rb +28 -4
  13. data/lib/oci/core/models/boot_volume.rb +56 -8
  14. data/lib/oci/core/models/boot_volume_attachment.rb +49 -7
  15. data/lib/oci/core/models/bulk_add_virtual_circuit_public_prefixes_details.rb +7 -1
  16. data/lib/oci/core/models/bulk_delete_virtual_circuit_public_prefixes_details.rb +7 -1
  17. data/lib/oci/core/models/capture_console_history_details.rb +28 -4
  18. data/lib/oci/core/models/connect_local_peering_gateways_details.rb +7 -1
  19. data/lib/oci/core/models/console_history.rb +56 -8
  20. data/lib/oci/core/models/cpe.rb +28 -4
  21. data/lib/oci/core/models/create_cpe_details.rb +21 -3
  22. data/lib/oci/core/models/create_cross_connect_details.rb +49 -7
  23. data/lib/oci/core/models/create_cross_connect_group_details.rb +14 -2
  24. data/lib/oci/core/models/create_dhcp_details.rb +35 -5
  25. data/lib/oci/core/models/create_drg_attachment_details.rb +21 -3
  26. data/lib/oci/core/models/create_drg_details.rb +14 -2
  27. data/lib/oci/core/models/create_image_details.rb +49 -7
  28. data/lib/oci/core/models/create_instance_console_connection_details.rb +28 -4
  29. data/lib/oci/core/models/create_internet_gateway_details.rb +28 -4
  30. data/lib/oci/core/models/create_ip_sec_connection_details.rb +35 -5
  31. data/lib/oci/core/models/create_local_peering_gateway_details.rb +21 -3
  32. data/lib/oci/core/models/create_private_ip_details.rb +42 -6
  33. data/lib/oci/core/models/create_public_ip_details.rb +21 -3
  34. data/lib/oci/core/models/create_route_table_details.rb +42 -6
  35. data/lib/oci/core/models/create_security_list_details.rb +49 -7
  36. data/lib/oci/core/models/create_subnet_details.rb +84 -12
  37. data/lib/oci/core/models/create_vcn_details.rb +42 -6
  38. data/lib/oci/core/models/create_virtual_circuit_details.rb +70 -10
  39. data/lib/oci/core/models/create_virtual_circuit_public_prefix_details.rb +7 -1
  40. data/lib/oci/core/models/create_vnic_details.rb +42 -6
  41. data/lib/oci/core/models/create_volume_backup_details.rb +28 -4
  42. data/lib/oci/core/models/create_volume_backup_policy_assignment_details.rb +14 -2
  43. data/lib/oci/core/models/create_volume_details.rb +70 -10
  44. data/lib/oci/core/models/cross_connect.rb +56 -8
  45. data/lib/oci/core/models/cross_connect_group.rb +28 -4
  46. data/lib/oci/core/models/cross_connect_mapping.rb +28 -4
  47. data/lib/oci/core/models/cross_connect_port_speed_shape.rb +7 -1
  48. data/lib/oci/core/models/cross_connect_status.rb +28 -4
  49. data/lib/oci/core/models/delete_virtual_circuit_public_prefix_details.rb +7 -1
  50. data/lib/oci/core/models/dhcp_dns_option.rb +14 -2
  51. data/lib/oci/core/models/dhcp_options.rb +49 -7
  52. data/lib/oci/core/models/dhcp_search_domain_option.rb +7 -1
  53. data/lib/oci/core/models/drg.rb +28 -4
  54. data/lib/oci/core/models/drg_attachment.rb +42 -6
  55. data/lib/oci/core/models/egress_security_rule.rb +28 -4
  56. data/lib/oci/core/models/export_image_details.rb +7 -1
  57. data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +21 -3
  58. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +7 -1
  59. data/lib/oci/core/models/fast_connect_provider_service.rb +35 -5
  60. data/lib/oci/core/models/get_public_ip_by_ip_address_details.rb +7 -1
  61. data/lib/oci/core/models/get_public_ip_by_private_ip_id_details.rb +7 -1
  62. data/lib/oci/core/models/i_scsi_volume_attachment.rb +22 -10
  63. data/lib/oci/core/models/image.rb +84 -12
  64. data/lib/oci/core/models/image_source_details.rb +14 -2
  65. data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +22 -4
  66. data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +8 -2
  67. data/lib/oci/core/models/ingress_security_rule.rb +28 -4
  68. data/lib/oci/core/models/instance.rb +91 -13
  69. data/lib/oci/core/models/instance_console_connection.rb +49 -7
  70. data/lib/oci/core/models/instance_source_details.rb +7 -1
  71. data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +7 -1
  72. data/lib/oci/core/models/instance_source_via_image_details.rb +7 -1
  73. data/lib/oci/core/models/internet_gateway.rb +42 -6
  74. data/lib/oci/core/models/ip_sec_connection.rb +49 -7
  75. data/lib/oci/core/models/ip_sec_connection_device_config.rb +14 -2
  76. data/lib/oci/core/models/ip_sec_connection_device_status.rb +14 -2
  77. data/lib/oci/core/models/launch_instance_details.rb +84 -12
  78. data/lib/oci/core/models/launch_options.rb +21 -3
  79. data/lib/oci/core/models/letter_of_authority.rb +49 -7
  80. data/lib/oci/core/models/local_peering_gateway.rb +63 -9
  81. data/lib/oci/core/models/private_ip.rb +77 -11
  82. data/lib/oci/core/models/public_ip.rb +49 -7
  83. data/lib/oci/core/models/route_rule.rb +14 -2
  84. data/lib/oci/core/models/route_table.rb +56 -8
  85. data/lib/oci/core/models/security_list.rb +63 -9
  86. data/lib/oci/core/models/subnet.rb +119 -17
  87. data/lib/oci/core/models/tcp_options.rb +14 -2
  88. data/lib/oci/core/models/tunnel_config.rb +21 -3
  89. data/lib/oci/core/models/tunnel_status.rb +28 -4
  90. data/lib/oci/core/models/udp_options.rb +14 -2
  91. data/lib/oci/core/models/update_boot_volume_details.rb +7 -1
  92. data/lib/oci/core/models/update_console_history_details.rb +21 -3
  93. data/lib/oci/core/models/update_cpe_details.rb +7 -1
  94. data/lib/oci/core/models/update_cross_connect_details.rb +14 -2
  95. data/lib/oci/core/models/update_cross_connect_group_details.rb +7 -1
  96. data/lib/oci/core/models/update_dhcp_details.rb +21 -3
  97. data/lib/oci/core/models/update_drg_attachment_details.rb +7 -1
  98. data/lib/oci/core/models/update_drg_details.rb +7 -1
  99. data/lib/oci/core/models/update_image_details.rb +21 -3
  100. data/lib/oci/core/models/update_instance_details.rb +21 -3
  101. data/lib/oci/core/models/update_internet_gateway_details.rb +14 -2
  102. data/lib/oci/core/models/update_ip_sec_connection_details.rb +7 -1
  103. data/lib/oci/core/models/update_local_peering_gateway_details.rb +7 -1
  104. data/lib/oci/core/models/update_private_ip_details.rb +35 -5
  105. data/lib/oci/core/models/update_public_ip_details.rb +14 -2
  106. data/lib/oci/core/models/update_route_table_details.rb +28 -4
  107. data/lib/oci/core/models/update_security_list_details.rb +35 -5
  108. data/lib/oci/core/models/update_subnet_details.rb +21 -3
  109. data/lib/oci/core/models/update_vcn_details.rb +21 -3
  110. data/lib/oci/core/models/update_virtual_circuit_details.rb +49 -7
  111. data/lib/oci/core/models/update_vnic_details.rb +21 -3
  112. data/lib/oci/core/models/update_volume_backup_details.rb +21 -3
  113. data/lib/oci/core/models/update_volume_details.rb +21 -3
  114. data/lib/oci/core/models/vcn.rb +84 -12
  115. data/lib/oci/core/models/virtual_circuit.rb +126 -18
  116. data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +7 -1
  117. data/lib/oci/core/models/virtual_circuit_public_prefix.rb +14 -2
  118. data/lib/oci/core/models/vnic.rb +84 -12
  119. data/lib/oci/core/models/vnic_attachment.rb +70 -10
  120. data/lib/oci/core/models/volume.rb +77 -11
  121. data/lib/oci/core/models/volume_attachment.rb +63 -9
  122. data/lib/oci/core/models/volume_backup.rb +98 -14
  123. data/lib/oci/core/models/volume_backup_policy.rb +14 -2
  124. data/lib/oci/core/models/volume_backup_policy_assignment.rb +21 -3
  125. data/lib/oci/core/models/volume_backup_schedule.rb +21 -3
  126. data/lib/oci/database/database_client.rb +2 -2
  127. data/lib/oci/database/models/backup.rb +56 -8
  128. data/lib/oci/database/models/backup_summary.rb +56 -8
  129. data/lib/oci/database/models/create_backup_details.rb +14 -2
  130. data/lib/oci/database/models/create_data_guard_association_details.rb +28 -4
  131. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +10 -4
  132. data/lib/oci/database/models/create_database_details.rb +49 -7
  133. data/lib/oci/database/models/create_database_from_backup_details.rb +21 -3
  134. data/lib/oci/database/models/create_db_home_details.rb +14 -2
  135. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +14 -2
  136. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +9 -3
  137. data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +2 -2
  138. data/lib/oci/database/models/data_guard_association.rb +91 -13
  139. data/lib/oci/database/models/data_guard_association_summary.rb +91 -13
  140. data/lib/oci/database/models/database.rb +84 -12
  141. data/lib/oci/database/models/database_summary.rb +84 -12
  142. data/lib/oci/database/models/db_backup_config.rb +7 -1
  143. data/lib/oci/database/models/db_home.rb +49 -7
  144. data/lib/oci/database/models/db_home_summary.rb +49 -7
  145. data/lib/oci/database/models/db_node.rb +42 -6
  146. data/lib/oci/database/models/db_node_summary.rb +42 -6
  147. data/lib/oci/database/models/db_system.rb +161 -23
  148. data/lib/oci/database/models/db_system_shape_summary.rb +7 -1
  149. data/lib/oci/database/models/db_system_summary.rb +161 -23
  150. data/lib/oci/database/models/db_version_summary.rb +7 -1
  151. data/lib/oci/database/models/failover_data_guard_association_details.rb +7 -1
  152. data/lib/oci/database/models/launch_db_system_details.rb +105 -15
  153. data/lib/oci/database/models/patch.rb +35 -5
  154. data/lib/oci/database/models/patch_details.rb +7 -1
  155. data/lib/oci/database/models/patch_history_entry.rb +35 -5
  156. data/lib/oci/database/models/patch_history_entry_summary.rb +35 -5
  157. data/lib/oci/database/models/patch_summary.rb +35 -5
  158. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +7 -1
  159. data/lib/oci/database/models/restore_database_details.rb +7 -1
  160. data/lib/oci/database/models/switchover_data_guard_association_details.rb +7 -1
  161. data/lib/oci/database/models/update_database_details.rb +7 -1
  162. data/lib/oci/database/models/update_db_home_details.rb +7 -1
  163. data/lib/oci/database/models/update_db_system_details.rb +21 -3
  164. data/lib/oci/dns/models/create_zone_details.rb +21 -3
  165. data/lib/oci/dns/models/record.rb +21 -3
  166. data/lib/oci/dns/models/record_details.rb +21 -3
  167. data/lib/oci/dns/models/record_operation.rb +21 -3
  168. data/lib/oci/dns/models/update_zone_details.rb +7 -1
  169. data/lib/oci/dns/models/zone.rb +42 -6
  170. data/lib/oci/dns/models/zone_summary.rb +28 -4
  171. data/lib/oci/file_storage/file_storage.rb +33 -0
  172. data/lib/oci/file_storage/file_storage_client.rb +1117 -0
  173. data/lib/oci/file_storage/models/create_export_details.rb +162 -0
  174. data/lib/oci/file_storage/models/create_file_system_details.rb +170 -0
  175. data/lib/oci/file_storage/models/create_mount_target_details.rb +242 -0
  176. data/lib/oci/file_storage/models/create_snapshot_details.rb +146 -0
  177. data/lib/oci/file_storage/models/export.rb +261 -0
  178. data/lib/oci/file_storage/models/export_set.rb +315 -0
  179. data/lib/oci/file_storage/models/export_set_summary.rb +260 -0
  180. data/lib/oci/file_storage/models/export_summary.rb +233 -0
  181. data/lib/oci/file_storage/models/file_system.rb +273 -0
  182. data/lib/oci/file_storage/models/file_system_summary.rb +265 -0
  183. data/lib/oci/file_storage/models/mount_target.rb +320 -0
  184. data/lib/oci/file_storage/models/mount_target_summary.rb +300 -0
  185. data/lib/oci/file_storage/models/snapshot.rb +217 -0
  186. data/lib/oci/file_storage/models/snapshot_summary.rb +217 -0
  187. data/lib/oci/file_storage/models/update_export_set_details.rb +185 -0
  188. data/lib/oci/file_storage/models/update_file_system_details.rb +131 -0
  189. data/lib/oci/file_storage/models/update_mount_target_details.rb +131 -0
  190. data/lib/oci/file_storage/util.rb +2 -0
  191. data/lib/oci/identity/models/add_user_to_group_details.rb +14 -2
  192. data/lib/oci/identity/models/api_key.rb +42 -6
  193. data/lib/oci/identity/models/availability_domain.rb +7 -1
  194. data/lib/oci/identity/models/compartment.rb +42 -6
  195. data/lib/oci/identity/models/create_compartment_details.rb +21 -3
  196. data/lib/oci/identity/models/create_customer_secret_key_details.rb +7 -1
  197. data/lib/oci/identity/models/create_dynamic_group_details.rb +14 -2
  198. data/lib/oci/identity/models/create_group_details.rb +21 -3
  199. data/lib/oci/identity/models/create_identity_provider_details.rb +28 -4
  200. data/lib/oci/identity/models/create_idp_group_mapping_details.rb +14 -2
  201. data/lib/oci/identity/models/create_policy_details.rb +28 -4
  202. data/lib/oci/identity/models/create_region_subscription_details.rb +7 -1
  203. data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +11 -5
  204. data/lib/oci/identity/models/create_tag_details.rb +14 -2
  205. data/lib/oci/identity/models/create_tag_namespace_details.rb +21 -3
  206. data/lib/oci/identity/models/create_user_details.rb +21 -3
  207. data/lib/oci/identity/models/customer_secret_key.rb +42 -6
  208. data/lib/oci/identity/models/customer_secret_key_summary.rb +42 -6
  209. data/lib/oci/identity/models/dynamic_group.rb +35 -5
  210. data/lib/oci/identity/models/group.rb +42 -6
  211. data/lib/oci/identity/models/identity_provider.rb +49 -7
  212. data/lib/oci/identity/models/idp_group_mapping.rb +49 -7
  213. data/lib/oci/identity/models/policy.rb +49 -7
  214. data/lib/oci/identity/models/region_subscription.rb +21 -3
  215. data/lib/oci/identity/models/saml2_identity_provider.rb +28 -10
  216. data/lib/oci/identity/models/swift_password.rb +35 -5
  217. data/lib/oci/identity/models/tag.rb +49 -7
  218. data/lib/oci/identity/models/tag_namespace.rb +35 -5
  219. data/lib/oci/identity/models/tag_namespace_summary.rb +35 -5
  220. data/lib/oci/identity/models/tag_summary.rb +35 -5
  221. data/lib/oci/identity/models/tenancy.rb +21 -3
  222. data/lib/oci/identity/models/ui_password.rb +28 -4
  223. data/lib/oci/identity/models/update_compartment_details.rb +14 -2
  224. data/lib/oci/identity/models/update_customer_secret_key_details.rb +7 -1
  225. data/lib/oci/identity/models/update_dynamic_group_details.rb +7 -1
  226. data/lib/oci/identity/models/update_group_details.rb +14 -2
  227. data/lib/oci/identity/models/update_identity_provider_details.rb +14 -2
  228. data/lib/oci/identity/models/update_idp_group_mapping_details.rb +14 -2
  229. data/lib/oci/identity/models/update_policy_details.rb +21 -3
  230. data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +9 -3
  231. data/lib/oci/identity/models/update_tag_details.rb +21 -3
  232. data/lib/oci/identity/models/update_tag_namespace_details.rb +21 -3
  233. data/lib/oci/identity/models/update_user_details.rb +14 -2
  234. data/lib/oci/identity/models/user.rb +42 -6
  235. data/lib/oci/identity/models/user_group_membership.rb +42 -6
  236. data/lib/oci/load_balancer/models/backend.rb +7 -1
  237. data/lib/oci/load_balancer/models/backend_details.rb +7 -1
  238. data/lib/oci/load_balancer/models/backend_health.rb +7 -1
  239. data/lib/oci/load_balancer/models/backend_set.rb +21 -3
  240. data/lib/oci/load_balancer/models/backend_set_details.rb +21 -3
  241. data/lib/oci/load_balancer/models/backend_set_health.rb +28 -4
  242. data/lib/oci/load_balancer/models/certificate.rb +21 -3
  243. data/lib/oci/load_balancer/models/certificate_details.rb +28 -4
  244. data/lib/oci/load_balancer/models/connection_configuration.rb +7 -1
  245. data/lib/oci/load_balancer/models/create_backend_details.rb +7 -1
  246. data/lib/oci/load_balancer/models/create_backend_set_details.rb +21 -3
  247. data/lib/oci/load_balancer/models/create_certificate_details.rb +28 -4
  248. data/lib/oci/load_balancer/models/create_listener_details.rb +28 -4
  249. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +51 -7
  250. data/lib/oci/load_balancer/models/create_path_route_set_details.rb +7 -1
  251. data/lib/oci/load_balancer/models/health_check_result.rb +21 -3
  252. data/lib/oci/load_balancer/models/health_checker.rb +35 -5
  253. data/lib/oci/load_balancer/models/health_checker_details.rb +35 -5
  254. data/lib/oci/load_balancer/models/ip_address.rb +14 -2
  255. data/lib/oci/load_balancer/models/listener.rb +28 -4
  256. data/lib/oci/load_balancer/models/listener_details.rb +28 -4
  257. data/lib/oci/load_balancer/models/load_balancer.rb +70 -10
  258. data/lib/oci/load_balancer/models/load_balancer_health.rb +28 -4
  259. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +7 -1
  260. data/lib/oci/load_balancer/models/path_match_type.rb +7 -1
  261. data/lib/oci/load_balancer/models/path_route.rb +14 -2
  262. data/lib/oci/load_balancer/models/path_route_set.rb +7 -1
  263. data/lib/oci/load_balancer/models/path_route_set_details.rb +7 -1
  264. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +16 -2
  265. data/lib/oci/load_balancer/models/ssl_configuration.rb +23 -3
  266. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +23 -3
  267. data/lib/oci/load_balancer/models/update_backend_set_details.rb +21 -3
  268. data/lib/oci/load_balancer/models/update_health_checker_details.rb +35 -5
  269. data/lib/oci/load_balancer/models/update_listener_details.rb +28 -4
  270. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +7 -1
  271. data/lib/oci/load_balancer/models/update_path_route_set_details.rb +7 -1
  272. data/lib/oci/load_balancer/models/work_request.rb +35 -5
  273. data/lib/oci/load_balancer/models/work_request_error.rb +7 -1
  274. data/lib/oci/object_storage/models/bucket.rb +83 -11
  275. data/lib/oci/object_storage/models/bucket_summary.rb +67 -7
  276. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +14 -2
  277. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +7 -1
  278. data/lib/oci/object_storage/models/create_bucket_details.rb +67 -7
  279. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +21 -3
  280. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +21 -3
  281. data/lib/oci/object_storage/models/list_objects.rb +7 -1
  282. data/lib/oci/object_storage/models/multipart_upload.rb +14 -2
  283. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +7 -1
  284. data/lib/oci/object_storage/models/namespace_metadata.rb +14 -2
  285. data/lib/oci/object_storage/models/object_summary.rb +7 -1
  286. data/lib/oci/object_storage/models/preauthenticated_request.rb +35 -5
  287. data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +28 -4
  288. data/lib/oci/object_storage/models/rename_object_details.rb +35 -5
  289. data/lib/oci/object_storage/models/restore_objects_details.rb +25 -5
  290. data/lib/oci/object_storage/models/update_bucket_details.rb +60 -6
  291. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +14 -2
  292. data/lib/oci/object_storage/object_storage_client.rb +17 -5
  293. data/lib/oci/object_storage/transfer/multipart/multipart_object_assembler.rb +11 -3
  294. data/lib/oci/signer.rb +0 -8
  295. data/lib/oci/version.rb +1 -1
  296. data/lib/oci/waiter.rb +1 -0
  297. metadata +22 -2
@@ -0,0 +1,146 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class FileStorage::Models::CreateSnapshotDetails
7
+ # **[Required]** The OCID of this export's file system.
8
+ # @return [String]
9
+ attr_accessor :file_system_id
10
+
11
+ # **[Required]** Name of the snapshot. This value is immutable. It must also be unique with respect
12
+ # to all other non-DELETED snapshots on the associated file
13
+ # system.
14
+ #
15
+ # Avoid entering confidential information.
16
+ #
17
+ # Example: `Sunday`
18
+ #
19
+ # @return [String]
20
+ attr_accessor :name
21
+
22
+
23
+ # Initializes the object
24
+ # @param [Hash] attributes Model attributes in the form of hash
25
+ # @option attributes [String] :file_system_id The value to assign to the {#file_system_id} property
26
+ # @option attributes [String] :name The value to assign to the {#name} property
27
+ def initialize(attributes = {})
28
+ return unless attributes.is_a?(Hash)
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
32
+
33
+ if attributes[:'fileSystemId']
34
+ self.file_system_id = attributes[:'fileSystemId']
35
+ end
36
+
37
+ raise 'You cannot provide both :fileSystemId and :file_system_id' if attributes.key?(:'fileSystemId') && attributes.key?(:'file_system_id')
38
+
39
+ if attributes[:'file_system_id']
40
+ self.file_system_id = attributes[:'file_system_id']
41
+ end
42
+
43
+ if attributes[:'name']
44
+ self.name = attributes[:'name']
45
+ end
46
+
47
+ end
48
+
49
+ # Checks equality by comparing each attribute.
50
+ # @param [Object] other_object to be compared
51
+ def ==(other_object)
52
+ return true if self.equal?(other_object)
53
+ self.class == other_object.class &&
54
+ file_system_id == other_object.file_system_id &&
55
+ name == other_object.name
56
+ end
57
+
58
+ # @see the `==` method
59
+ # @param [Object] other_object to be compared
60
+ def eql?(other_object)
61
+ self == other_object
62
+ end
63
+
64
+ # Calculates hash code according to all attributes.
65
+ # @return [Fixnum] Hash code
66
+ def hash
67
+ [file_system_id, name].hash
68
+ end
69
+
70
+ # Builds the object from hash
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ # @return [Object] Returns the model itself
73
+ def build_from_hash(attributes)
74
+ return nil unless attributes.is_a?(Hash)
75
+ self.class.swagger_types.each_pair do |key, type|
76
+ if type =~ /^Array<(.*)>/i
77
+ # check to ensure the input is an array given that the the attribute
78
+ # is documented as an array but the input is not
79
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
80
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
81
+ end
82
+ elsif !attributes[self.class.attribute_map[key]].nil?
83
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
84
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
85
+ end
86
+
87
+ self
88
+ end
89
+
90
+ # Returns the string representation of the object
91
+ # @return [String] String presentation of the object
92
+ def to_s
93
+ to_hash.to_s
94
+ end
95
+
96
+ # Returns the object in the form of hash
97
+ # @return [Hash] Returns the object in the form of hash
98
+ def to_hash
99
+ hash = {}
100
+ self.class.attribute_map.each_pair do |attr, param|
101
+ value = public_method(attr).call
102
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
103
+ hash[param] = _to_hash(value)
104
+ end
105
+ hash
106
+ end
107
+
108
+ private
109
+
110
+ # Outputs non-array value in the form of hash
111
+ # For object, use to_hash. Otherwise, just return the value
112
+ # @param [Object] value Any valid value
113
+ # @return [Hash] Returns the value in the form of hash
114
+ def _to_hash(value)
115
+ if value.is_a?(Array)
116
+ value.compact.map{ |v| _to_hash(v) }
117
+ elsif value.is_a?(Hash)
118
+ {}.tap do |hash|
119
+ value.each { |k, v| hash[k] = _to_hash(v) }
120
+ end
121
+ elsif value.respond_to? :to_hash
122
+ value.to_hash
123
+ else
124
+ value
125
+ end
126
+ end
127
+
128
+
129
+
130
+ # Attribute mapping from ruby-style variable name to JSON key.
131
+ def self.attribute_map
132
+ {
133
+ :'file_system_id' => :'fileSystemId',
134
+ :'name' => :'name'
135
+ }
136
+ end
137
+
138
+ # Attribute type mapping.
139
+ def self.swagger_types
140
+ {
141
+ :'file_system_id' => :'String',
142
+ :'name' => :'String'
143
+ }
144
+ end
145
+ end
146
+ end
@@ -0,0 +1,261 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ # A file system and the path that you can use to mount it. Each export
7
+ # resource belongs to exactly one export set.
8
+ #
9
+ # The export's path attribute is not a path in the
10
+ # referenced file system, but the value used by clients for the path
11
+ # component of the remotetarget argument when mounting the file
12
+ # system.
13
+ #
14
+ # The path must start with a slash (/) followed by a sequence of zero or more
15
+ # slash-separated path elements. For any two export resources associated with
16
+ # the same export set, except those in a 'DELETED' state, the path element
17
+ # sequence for the first export resource can't contain the
18
+ # complete path element sequence of the second export resource.
19
+ #
20
+ # For example, the following are acceptable:
21
+ #
22
+ # * /foo and /bar
23
+ # * /foo1 and /foo2
24
+ # * /foo and /foo1
25
+ #
26
+ # The following examples are not acceptable:
27
+ # * /foo and /foo/bar
28
+ # * / and /foo
29
+ #
30
+ # Paths may not end in a slash (/). No path element can be a period (.)
31
+ # or two periods in sequence (..). All path elements must be 255 bytes or less.
32
+ #
33
+ # No two non-'DELETED' export resources in the same export set can
34
+ # reference the same file system.
35
+ #
36
+ class FileStorage::Models::Export
37
+
38
+ LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
39
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
40
+ LIFECYCLE_STATE_DELETING = 'DELETING',
41
+ LIFECYCLE_STATE_DELETED = 'DELETED',
42
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
43
+
44
+ # **[Required]** The OCID of this export's export set.
45
+ # @return [String]
46
+ attr_accessor :export_set_id
47
+
48
+ # **[Required]** The OCID of this export's file system.
49
+ # @return [String]
50
+ attr_accessor :file_system_id
51
+
52
+ # **[Required]** The OCID of this export.
53
+ # @return [String]
54
+ attr_accessor :id
55
+
56
+ # **[Required]** The current state of this export.
57
+ # @return [String]
58
+ attr_accessor :lifecycle_state
59
+
60
+ # **[Required]** Path used to access the associated file system.
61
+ #
62
+ # Avoid entering confidential information.
63
+ #
64
+ # Example: `/accounting`
65
+ #
66
+ # @return [String]
67
+ attr_accessor :path
68
+
69
+ # **[Required]** The date and time the export was created, expressed
70
+ # in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format.
71
+ #
72
+ # Example: `2016-08-25T21:10:29.600Z`
73
+ #
74
+ # @return [DateTime]
75
+ attr_accessor :time_created
76
+
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ # @option attributes [String] :export_set_id The value to assign to the {#export_set_id} property
81
+ # @option attributes [String] :file_system_id The value to assign to the {#file_system_id} property
82
+ # @option attributes [String] :id The value to assign to the {#id} property
83
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
84
+ # @option attributes [String] :path The value to assign to the {#path} property
85
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
86
+ def initialize(attributes = {})
87
+ return unless attributes.is_a?(Hash)
88
+
89
+ # convert string to symbol for hash key
90
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
91
+
92
+ if attributes[:'exportSetId']
93
+ self.export_set_id = attributes[:'exportSetId']
94
+ end
95
+
96
+ raise 'You cannot provide both :exportSetId and :export_set_id' if attributes.key?(:'exportSetId') && attributes.key?(:'export_set_id')
97
+
98
+ if attributes[:'export_set_id']
99
+ self.export_set_id = attributes[:'export_set_id']
100
+ end
101
+
102
+ if attributes[:'fileSystemId']
103
+ self.file_system_id = attributes[:'fileSystemId']
104
+ end
105
+
106
+ raise 'You cannot provide both :fileSystemId and :file_system_id' if attributes.key?(:'fileSystemId') && attributes.key?(:'file_system_id')
107
+
108
+ if attributes[:'file_system_id']
109
+ self.file_system_id = attributes[:'file_system_id']
110
+ end
111
+
112
+ if attributes[:'id']
113
+ self.id = attributes[:'id']
114
+ end
115
+
116
+ if attributes[:'lifecycleState']
117
+ self.lifecycle_state = attributes[:'lifecycleState']
118
+ end
119
+
120
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
121
+
122
+ if attributes[:'lifecycle_state']
123
+ self.lifecycle_state = attributes[:'lifecycle_state']
124
+ end
125
+
126
+ if attributes[:'path']
127
+ self.path = attributes[:'path']
128
+ end
129
+
130
+ if attributes[:'timeCreated']
131
+ self.time_created = attributes[:'timeCreated']
132
+ end
133
+
134
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
135
+
136
+ if attributes[:'time_created']
137
+ self.time_created = attributes[:'time_created']
138
+ end
139
+
140
+ end
141
+
142
+ # Custom attribute writer method checking allowed values (enum).
143
+ # @param [Object] lifecycle_state Object to be assigned
144
+ def lifecycle_state=(lifecycle_state)
145
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
146
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
147
+ else
148
+ @lifecycle_state = lifecycle_state
149
+ end
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param [Object] other_object to be compared
154
+ def ==(other_object)
155
+ return true if self.equal?(other_object)
156
+ self.class == other_object.class &&
157
+ export_set_id == other_object.export_set_id &&
158
+ file_system_id == other_object.file_system_id &&
159
+ id == other_object.id &&
160
+ lifecycle_state == other_object.lifecycle_state &&
161
+ path == other_object.path &&
162
+ time_created == other_object.time_created
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] other_object to be compared
167
+ def eql?(other_object)
168
+ self == other_object
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Fixnum] Hash code
173
+ def hash
174
+ [export_set_id, file_system_id, id, lifecycle_state, path, time_created].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ self.class.swagger_types.each_pair do |key, type|
183
+ if type =~ /^Array<(.*)>/i
184
+ # check to ensure the input is an array given that the the attribute
185
+ # is documented as an array but the input is not
186
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
187
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
188
+ end
189
+ elsif !attributes[self.class.attribute_map[key]].nil?
190
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
191
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
192
+ end
193
+
194
+ self
195
+ end
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
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ private
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map{ |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+
236
+
237
+ # Attribute mapping from ruby-style variable name to JSON key.
238
+ def self.attribute_map
239
+ {
240
+ :'export_set_id' => :'exportSetId',
241
+ :'file_system_id' => :'fileSystemId',
242
+ :'id' => :'id',
243
+ :'lifecycle_state' => :'lifecycleState',
244
+ :'path' => :'path',
245
+ :'time_created' => :'timeCreated'
246
+ }
247
+ end
248
+
249
+ # Attribute type mapping.
250
+ def self.swagger_types
251
+ {
252
+ :'export_set_id' => :'String',
253
+ :'file_system_id' => :'String',
254
+ :'id' => :'String',
255
+ :'lifecycle_state' => :'String',
256
+ :'path' => :'String',
257
+ :'time_created' => :'DateTime'
258
+ }
259
+ end
260
+ end
261
+ end
@@ -0,0 +1,315 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ # A set of file systems to export through one or more mount
7
+ # targets. Composed of zero or more export resources.
8
+ #
9
+ class FileStorage::Models::ExportSet
10
+
11
+ LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
12
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
13
+ LIFECYCLE_STATE_DELETING = 'DELETING',
14
+ LIFECYCLE_STATE_DELETED = 'DELETED',
15
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
16
+
17
+ # The availability domain the export set is in. May be unset
18
+ # as a blank or NULL value.
19
+ #
20
+ # Example: `Uocm:PHX-AD-1`
21
+ #
22
+ # @return [String]
23
+ attr_accessor :availability_domain
24
+
25
+ # **[Required]** The OCID of the compartment that contains the export set.
26
+ # @return [String]
27
+ attr_accessor :compartment_id
28
+
29
+ # **[Required]** A user-friendly name. It does not have to be unique, and it is changeable.
30
+ # Avoid entering confidential information.
31
+ #
32
+ # Example: `My export set`
33
+ #
34
+ # @return [String]
35
+ attr_accessor :display_name
36
+
37
+ # **[Required]** The OCID of the export set.
38
+ # @return [String]
39
+ attr_accessor :id
40
+
41
+ # **[Required]** The current state of the export set.
42
+ # @return [String]
43
+ attr_accessor :lifecycle_state
44
+
45
+ # Controls the maximum `tbytes`, `fbytes`, and `abytes`,
46
+ # values reported by `NFS FSSTAT` calls through any associated
47
+ # mount targets. This is an advanced feature. For most
48
+ # applications, use the default value. The
49
+ # `tbytes` value reported by `FSSTAT` will be
50
+ # `maxFsStatBytes`. The value of `fbytes` and `abytes` will be
51
+ # `maxFsStatBytes` minus the metered size of the file
52
+ # system. If the metered size is larger than `maxFsStatBytes`,
53
+ # then `fbytes` and `abytes` will both be '0'.
54
+ #
55
+ # @return [Integer]
56
+ attr_accessor :max_fs_stat_bytes
57
+
58
+ # Controls the maximum `ffiles`, `ffiles`, and `afiles`
59
+ # values reported by `NFS FSSTAT` calls through any associated
60
+ # mount targets. This is an advanced feature. For most
61
+ # applications, use the default value. The
62
+ # `tfiles` value reported by `FSSTAT` will be
63
+ # `maxFsStatFiles`. The value of `ffiles` and `afiles` will be
64
+ # `maxFsStatFiles` minus the metered size of the file
65
+ # system. If the metered size is larger than `maxFsStatFiles`,
66
+ # then `ffiles` and `afiles` will both be '0'.
67
+ #
68
+ # @return [Integer]
69
+ attr_accessor :max_fs_stat_files
70
+
71
+ # **[Required]** The date and time the export set was created, expressed
72
+ # in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format.
73
+ #
74
+ # Example: `2016-08-25T21:10:29.600Z`
75
+ #
76
+ # @return [DateTime]
77
+ attr_accessor :time_created
78
+
79
+ # **[Required]** The OCID of the virtual cloud network (VCN) the export set is in.
80
+ # @return [String]
81
+ attr_accessor :vcn_id
82
+
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ # @option attributes [String] :availability_domain The value to assign to the {#availability_domain} property
87
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
88
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
89
+ # @option attributes [String] :id The value to assign to the {#id} property
90
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
91
+ # @option attributes [Integer] :max_fs_stat_bytes The value to assign to the {#max_fs_stat_bytes} property
92
+ # @option attributes [Integer] :max_fs_stat_files The value to assign to the {#max_fs_stat_files} property
93
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
94
+ # @option attributes [String] :vcn_id The value to assign to the {#vcn_id} property
95
+ def initialize(attributes = {})
96
+ return unless attributes.is_a?(Hash)
97
+
98
+ # convert string to symbol for hash key
99
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
100
+
101
+ if attributes[:'availabilityDomain']
102
+ self.availability_domain = attributes[:'availabilityDomain']
103
+ end
104
+
105
+ raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
106
+
107
+ if attributes[:'availability_domain']
108
+ self.availability_domain = attributes[:'availability_domain']
109
+ end
110
+
111
+ if attributes[:'compartmentId']
112
+ self.compartment_id = attributes[:'compartmentId']
113
+ end
114
+
115
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
116
+
117
+ if attributes[:'compartment_id']
118
+ self.compartment_id = attributes[:'compartment_id']
119
+ end
120
+
121
+ if attributes[:'displayName']
122
+ self.display_name = attributes[:'displayName']
123
+ end
124
+
125
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
126
+
127
+ if attributes[:'display_name']
128
+ self.display_name = attributes[:'display_name']
129
+ end
130
+
131
+ if attributes[:'id']
132
+ self.id = attributes[:'id']
133
+ end
134
+
135
+ if attributes[:'lifecycleState']
136
+ self.lifecycle_state = attributes[:'lifecycleState']
137
+ end
138
+
139
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
140
+
141
+ if attributes[:'lifecycle_state']
142
+ self.lifecycle_state = attributes[:'lifecycle_state']
143
+ end
144
+
145
+ if attributes[:'maxFsStatBytes']
146
+ self.max_fs_stat_bytes = attributes[:'maxFsStatBytes']
147
+ end
148
+
149
+ raise 'You cannot provide both :maxFsStatBytes and :max_fs_stat_bytes' if attributes.key?(:'maxFsStatBytes') && attributes.key?(:'max_fs_stat_bytes')
150
+
151
+ if attributes[:'max_fs_stat_bytes']
152
+ self.max_fs_stat_bytes = attributes[:'max_fs_stat_bytes']
153
+ end
154
+
155
+ if attributes[:'maxFsStatFiles']
156
+ self.max_fs_stat_files = attributes[:'maxFsStatFiles']
157
+ end
158
+
159
+ raise 'You cannot provide both :maxFsStatFiles and :max_fs_stat_files' if attributes.key?(:'maxFsStatFiles') && attributes.key?(:'max_fs_stat_files')
160
+
161
+ if attributes[:'max_fs_stat_files']
162
+ self.max_fs_stat_files = attributes[:'max_fs_stat_files']
163
+ end
164
+
165
+ if attributes[:'timeCreated']
166
+ self.time_created = attributes[:'timeCreated']
167
+ end
168
+
169
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
170
+
171
+ if attributes[:'time_created']
172
+ self.time_created = attributes[:'time_created']
173
+ end
174
+
175
+ if attributes[:'vcnId']
176
+ self.vcn_id = attributes[:'vcnId']
177
+ end
178
+
179
+ raise 'You cannot provide both :vcnId and :vcn_id' if attributes.key?(:'vcnId') && attributes.key?(:'vcn_id')
180
+
181
+ if attributes[:'vcn_id']
182
+ self.vcn_id = attributes[:'vcn_id']
183
+ end
184
+
185
+ end
186
+
187
+ # Custom attribute writer method checking allowed values (enum).
188
+ # @param [Object] lifecycle_state Object to be assigned
189
+ def lifecycle_state=(lifecycle_state)
190
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
191
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
192
+ else
193
+ @lifecycle_state = lifecycle_state
194
+ end
195
+ end
196
+
197
+ # Checks equality by comparing each attribute.
198
+ # @param [Object] other_object to be compared
199
+ def ==(other_object)
200
+ return true if self.equal?(other_object)
201
+ self.class == other_object.class &&
202
+ availability_domain == other_object.availability_domain &&
203
+ compartment_id == other_object.compartment_id &&
204
+ display_name == other_object.display_name &&
205
+ id == other_object.id &&
206
+ lifecycle_state == other_object.lifecycle_state &&
207
+ max_fs_stat_bytes == other_object.max_fs_stat_bytes &&
208
+ max_fs_stat_files == other_object.max_fs_stat_files &&
209
+ time_created == other_object.time_created &&
210
+ vcn_id == other_object.vcn_id
211
+ end
212
+
213
+ # @see the `==` method
214
+ # @param [Object] other_object to be compared
215
+ def eql?(other_object)
216
+ self == other_object
217
+ end
218
+
219
+ # Calculates hash code according to all attributes.
220
+ # @return [Fixnum] Hash code
221
+ def hash
222
+ [availability_domain, compartment_id, display_name, id, lifecycle_state, max_fs_stat_bytes, max_fs_stat_files, time_created, vcn_id].hash
223
+ end
224
+
225
+ # Builds the object from hash
226
+ # @param [Hash] attributes Model attributes in the form of hash
227
+ # @return [Object] Returns the model itself
228
+ def build_from_hash(attributes)
229
+ return nil unless attributes.is_a?(Hash)
230
+ self.class.swagger_types.each_pair do |key, type|
231
+ if type =~ /^Array<(.*)>/i
232
+ # check to ensure the input is an array given that the the attribute
233
+ # is documented as an array but the input is not
234
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
235
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
236
+ end
237
+ elsif !attributes[self.class.attribute_map[key]].nil?
238
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
239
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
240
+ end
241
+
242
+ self
243
+ end
244
+
245
+ # Returns the string representation of the object
246
+ # @return [String] String presentation of the object
247
+ def to_s
248
+ to_hash.to_s
249
+ end
250
+
251
+ # Returns the object in the form of hash
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_hash
254
+ hash = {}
255
+ self.class.attribute_map.each_pair do |attr, param|
256
+ value = public_method(attr).call
257
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
258
+ hash[param] = _to_hash(value)
259
+ end
260
+ hash
261
+ end
262
+
263
+ private
264
+
265
+ # Outputs non-array value in the form of hash
266
+ # For object, use to_hash. Otherwise, just return the value
267
+ # @param [Object] value Any valid value
268
+ # @return [Hash] Returns the value in the form of hash
269
+ def _to_hash(value)
270
+ if value.is_a?(Array)
271
+ value.compact.map{ |v| _to_hash(v) }
272
+ elsif value.is_a?(Hash)
273
+ {}.tap do |hash|
274
+ value.each { |k, v| hash[k] = _to_hash(v) }
275
+ end
276
+ elsif value.respond_to? :to_hash
277
+ value.to_hash
278
+ else
279
+ value
280
+ end
281
+ end
282
+
283
+
284
+
285
+ # Attribute mapping from ruby-style variable name to JSON key.
286
+ def self.attribute_map
287
+ {
288
+ :'availability_domain' => :'availabilityDomain',
289
+ :'compartment_id' => :'compartmentId',
290
+ :'display_name' => :'displayName',
291
+ :'id' => :'id',
292
+ :'lifecycle_state' => :'lifecycleState',
293
+ :'max_fs_stat_bytes' => :'maxFsStatBytes',
294
+ :'max_fs_stat_files' => :'maxFsStatFiles',
295
+ :'time_created' => :'timeCreated',
296
+ :'vcn_id' => :'vcnId'
297
+ }
298
+ end
299
+
300
+ # Attribute type mapping.
301
+ def self.swagger_types
302
+ {
303
+ :'availability_domain' => :'String',
304
+ :'compartment_id' => :'String',
305
+ :'display_name' => :'String',
306
+ :'id' => :'String',
307
+ :'lifecycle_state' => :'String',
308
+ :'max_fs_stat_bytes' => :'Integer',
309
+ :'max_fs_stat_files' => :'Integer',
310
+ :'time_created' => :'DateTime',
311
+ :'vcn_id' => :'String'
312
+ }
313
+ end
314
+ end
315
+ end