oci 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/lib/oci.rb +2 -1
  4. data/lib/oci/audit/audit.rb +19 -0
  5. data/lib/oci/audit/audit_client.rb +176 -0
  6. data/lib/oci/audit/models/audit_event.rb +307 -0
  7. data/lib/oci/audit/models/configuration.rb +120 -0
  8. data/lib/oci/audit/models/update_configuration_details.rb +120 -0
  9. data/lib/oci/audit/util.rb +1 -0
  10. data/lib/oci/core/blockstorage_client.rb +69 -1
  11. data/lib/oci/core/compute_client.rb +106 -16
  12. data/lib/oci/core/core.rb +3 -0
  13. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +2 -2
  14. data/lib/oci/core/models/attach_vnic_details.rb +2 -2
  15. data/lib/oci/core/models/attach_volume_details.rb +2 -2
  16. data/lib/oci/core/models/capture_console_history_details.rb +2 -2
  17. data/lib/oci/core/models/console_history.rb +2 -2
  18. data/lib/oci/core/models/cpe.rb +2 -2
  19. data/lib/oci/core/models/create_cpe_details.rb +2 -2
  20. data/lib/oci/core/models/create_cross_connect_details.rb +2 -2
  21. data/lib/oci/core/models/create_cross_connect_group_details.rb +2 -2
  22. data/lib/oci/core/models/create_dhcp_details.rb +2 -2
  23. data/lib/oci/core/models/create_drg_attachment_details.rb +2 -2
  24. data/lib/oci/core/models/create_drg_details.rb +2 -2
  25. data/lib/oci/core/models/create_image_details.rb +2 -2
  26. data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
  27. data/lib/oci/core/models/create_internet_gateway_details.rb +2 -2
  28. data/lib/oci/core/models/create_ip_sec_connection_details.rb +2 -2
  29. data/lib/oci/core/models/create_private_ip_details.rb +2 -2
  30. data/lib/oci/core/models/create_route_table_details.rb +2 -2
  31. data/lib/oci/core/models/create_security_list_details.rb +2 -2
  32. data/lib/oci/core/models/create_subnet_details.rb +2 -2
  33. data/lib/oci/core/models/create_vcn_details.rb +2 -2
  34. data/lib/oci/core/models/create_virtual_circuit_details.rb +5 -6
  35. data/lib/oci/core/models/create_vnic_details.rb +2 -2
  36. data/lib/oci/core/models/create_volume_backup_details.rb +2 -2
  37. data/lib/oci/core/models/create_volume_details.rb +20 -4
  38. data/lib/oci/core/models/cross_connect.rb +2 -2
  39. data/lib/oci/core/models/cross_connect_group.rb +2 -2
  40. data/lib/oci/core/models/cross_connect_location.rb +2 -2
  41. data/lib/oci/core/models/cross_connect_mapping.rb +2 -2
  42. data/lib/oci/core/models/cross_connect_port_speed_shape.rb +2 -2
  43. data/lib/oci/core/models/cross_connect_status.rb +2 -2
  44. data/lib/oci/core/models/dhcp_dns_option.rb +2 -2
  45. data/lib/oci/core/models/dhcp_option.rb +2 -2
  46. data/lib/oci/core/models/dhcp_options.rb +2 -2
  47. data/lib/oci/core/models/dhcp_search_domain_option.rb +2 -2
  48. data/lib/oci/core/models/drg.rb +2 -2
  49. data/lib/oci/core/models/drg_attachment.rb +2 -2
  50. data/lib/oci/core/models/egress_security_rule.rb +2 -2
  51. data/lib/oci/core/models/export_image_details.rb +3 -3
  52. data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +5 -5
  53. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +3 -3
  54. data/lib/oci/core/models/fast_connect_provider_service.rb +2 -2
  55. data/lib/oci/core/models/i_scsi_volume_attachment.rb +2 -2
  56. data/lib/oci/core/models/icmp_options.rb +2 -2
  57. data/lib/oci/core/models/image.rb +2 -2
  58. data/lib/oci/core/models/image_source_details.rb +3 -3
  59. data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +5 -5
  60. data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +3 -3
  61. data/lib/oci/core/models/ingress_security_rule.rb +2 -2
  62. data/lib/oci/core/models/instance.rb +4 -4
  63. data/lib/oci/core/models/instance_console_connection.rb +2 -2
  64. data/lib/oci/core/models/instance_credentials.rb +2 -2
  65. data/lib/oci/core/models/internet_gateway.rb +2 -2
  66. data/lib/oci/core/models/ip_sec_connection.rb +2 -2
  67. data/lib/oci/core/models/ip_sec_connection_device_config.rb +2 -2
  68. data/lib/oci/core/models/ip_sec_connection_device_status.rb +2 -2
  69. data/lib/oci/core/models/launch_instance_details.rb +4 -4
  70. data/lib/oci/core/models/letter_of_authority.rb +2 -2
  71. data/lib/oci/core/models/port_range.rb +2 -2
  72. data/lib/oci/core/models/private_ip.rb +2 -2
  73. data/lib/oci/core/models/route_rule.rb +2 -2
  74. data/lib/oci/core/models/route_table.rb +2 -2
  75. data/lib/oci/core/models/security_list.rb +2 -2
  76. data/lib/oci/core/models/shape.rb +2 -2
  77. data/lib/oci/core/models/subnet.rb +2 -2
  78. data/lib/oci/core/models/tcp_options.rb +2 -2
  79. data/lib/oci/core/models/tunnel_config.rb +2 -2
  80. data/lib/oci/core/models/tunnel_status.rb +2 -2
  81. data/lib/oci/core/models/udp_options.rb +2 -2
  82. data/lib/oci/core/models/update_console_history_details.rb +2 -2
  83. data/lib/oci/core/models/update_cpe_details.rb +2 -2
  84. data/lib/oci/core/models/update_cross_connect_details.rb +2 -2
  85. data/lib/oci/core/models/update_cross_connect_group_details.rb +2 -2
  86. data/lib/oci/core/models/update_dhcp_details.rb +2 -2
  87. data/lib/oci/core/models/update_drg_attachment_details.rb +2 -2
  88. data/lib/oci/core/models/update_drg_details.rb +2 -2
  89. data/lib/oci/core/models/update_image_details.rb +2 -2
  90. data/lib/oci/core/models/update_instance_details.rb +2 -2
  91. data/lib/oci/core/models/update_internet_gateway_details.rb +2 -2
  92. data/lib/oci/core/models/update_ip_sec_connection_details.rb +2 -2
  93. data/lib/oci/core/models/update_private_ip_details.rb +2 -2
  94. data/lib/oci/core/models/update_route_table_details.rb +2 -2
  95. data/lib/oci/core/models/update_security_list_details.rb +2 -2
  96. data/lib/oci/core/models/update_subnet_details.rb +2 -2
  97. data/lib/oci/core/models/update_vcn_details.rb +2 -2
  98. data/lib/oci/core/models/update_virtual_circuit_details.rb +2 -3
  99. data/lib/oci/core/models/update_vnic_details.rb +2 -2
  100. data/lib/oci/core/models/update_volume_backup_details.rb +2 -2
  101. data/lib/oci/core/models/update_volume_details.rb +2 -2
  102. data/lib/oci/core/models/vcn.rb +2 -2
  103. data/lib/oci/core/models/virtual_circuit.rb +5 -5
  104. data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +2 -2
  105. data/lib/oci/core/models/vnic.rb +2 -2
  106. data/lib/oci/core/models/vnic_attachment.rb +2 -2
  107. data/lib/oci/core/models/volume.rb +29 -5
  108. data/lib/oci/core/models/volume_attachment.rb +2 -2
  109. data/lib/oci/core/models/volume_backup.rb +2 -2
  110. data/lib/oci/core/models/volume_source_details.rb +131 -0
  111. data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +128 -0
  112. data/lib/oci/core/models/volume_source_from_volume_details.rb +128 -0
  113. data/lib/oci/core/virtual_network_client.rb +312 -10
  114. data/lib/oci/database/database.rb +7 -0
  115. data/lib/oci/database/database_client.rb +228 -4
  116. data/lib/oci/database/models/backup.rb +253 -0
  117. data/lib/oci/database/models/backup_summary.rb +253 -0
  118. data/lib/oci/database/models/create_backup_details.rb +131 -0
  119. data/lib/oci/database/models/create_data_guard_association_details.rb +2 -2
  120. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +2 -2
  121. data/lib/oci/database/models/create_database_details.rb +13 -3
  122. data/lib/oci/database/models/create_db_home_details.rb +2 -2
  123. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +2 -2
  124. data/lib/oci/database/models/data_guard_association.rb +2 -2
  125. data/lib/oci/database/models/data_guard_association_summary.rb +374 -0
  126. data/lib/oci/database/models/database.rb +15 -3
  127. data/lib/oci/database/models/database_summary.rb +15 -3
  128. data/lib/oci/database/models/db_backup_config.rb +120 -0
  129. data/lib/oci/database/models/db_home.rb +2 -2
  130. data/lib/oci/database/models/db_home_summary.rb +2 -2
  131. data/lib/oci/database/models/db_node.rb +2 -2
  132. data/lib/oci/database/models/db_node_summary.rb +2 -2
  133. data/lib/oci/database/models/db_system.rb +9 -9
  134. data/lib/oci/database/models/db_system_shape_summary.rb +2 -2
  135. data/lib/oci/database/models/db_system_summary.rb +9 -9
  136. data/lib/oci/database/models/db_version_summary.rb +2 -2
  137. data/lib/oci/database/models/failover_data_guard_association_details.rb +2 -2
  138. data/lib/oci/database/models/launch_db_system_details.rb +2 -2
  139. data/lib/oci/database/models/patch.rb +4 -2
  140. data/lib/oci/database/models/patch_details.rb +4 -3
  141. data/lib/oci/database/models/patch_history_entry.rb +3 -2
  142. data/lib/oci/database/models/patch_history_entry_summary.rb +3 -2
  143. data/lib/oci/database/models/patch_summary.rb +4 -2
  144. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +2 -2
  145. data/lib/oci/database/models/restore_database_details.rb +145 -0
  146. data/lib/oci/database/models/switchover_data_guard_association_details.rb +2 -2
  147. data/lib/oci/database/models/update_database_details.rb +119 -0
  148. data/lib/oci/database/models/update_db_home_details.rb +2 -2
  149. data/lib/oci/database/models/update_db_system_details.rb +9 -9
  150. data/lib/oci/identity/identity_client.rb +6 -5
  151. data/lib/oci/identity/models/add_user_to_group_details.rb +2 -2
  152. data/lib/oci/identity/models/api_key.rb +2 -2
  153. data/lib/oci/identity/models/availability_domain.rb +2 -2
  154. data/lib/oci/identity/models/compartment.rb +3 -3
  155. data/lib/oci/identity/models/create_api_key_details.rb +2 -2
  156. data/lib/oci/identity/models/create_compartment_details.rb +2 -2
  157. data/lib/oci/identity/models/create_customer_secret_key_details.rb +2 -2
  158. data/lib/oci/identity/models/create_group_details.rb +2 -2
  159. data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
  160. data/lib/oci/identity/models/create_idp_group_mapping_details.rb +2 -2
  161. data/lib/oci/identity/models/create_policy_details.rb +2 -2
  162. data/lib/oci/identity/models/create_region_subscription_details.rb +2 -2
  163. data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +2 -2
  164. data/lib/oci/identity/models/create_swift_password_details.rb +2 -2
  165. data/lib/oci/identity/models/create_user_details.rb +2 -2
  166. data/lib/oci/identity/models/customer_secret_key.rb +2 -2
  167. data/lib/oci/identity/models/customer_secret_key_summary.rb +2 -2
  168. data/lib/oci/identity/models/group.rb +2 -2
  169. data/lib/oci/identity/models/identity_provider.rb +4 -4
  170. data/lib/oci/identity/models/idp_group_mapping.rb +2 -2
  171. data/lib/oci/identity/models/policy.rb +2 -2
  172. data/lib/oci/identity/models/region.rb +4 -4
  173. data/lib/oci/identity/models/region_subscription.rb +4 -4
  174. data/lib/oci/identity/models/saml2_identity_provider.rb +2 -2
  175. data/lib/oci/identity/models/swift_password.rb +2 -2
  176. data/lib/oci/identity/models/tenancy.rb +2 -2
  177. data/lib/oci/identity/models/ui_password.rb +2 -2
  178. data/lib/oci/identity/models/update_compartment_details.rb +2 -2
  179. data/lib/oci/identity/models/update_customer_secret_key_details.rb +2 -2
  180. data/lib/oci/identity/models/update_group_details.rb +2 -2
  181. data/lib/oci/identity/models/update_identity_provider_details.rb +2 -2
  182. data/lib/oci/identity/models/update_idp_group_mapping_details.rb +2 -2
  183. data/lib/oci/identity/models/update_policy_details.rb +2 -2
  184. data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +2 -2
  185. data/lib/oci/identity/models/update_state_details.rb +2 -2
  186. data/lib/oci/identity/models/update_swift_password_details.rb +2 -2
  187. data/lib/oci/identity/models/update_user_details.rb +2 -2
  188. data/lib/oci/identity/models/user.rb +2 -2
  189. data/lib/oci/identity/models/user_group_membership.rb +2 -2
  190. data/lib/oci/load_balancer/load_balancer_client.rb +1 -1
  191. data/lib/oci/load_balancer/models/backend.rb +2 -2
  192. data/lib/oci/load_balancer/models/backend_details.rb +2 -2
  193. data/lib/oci/load_balancer/models/backend_health.rb +2 -2
  194. data/lib/oci/load_balancer/models/backend_set.rb +2 -2
  195. data/lib/oci/load_balancer/models/backend_set_details.rb +2 -2
  196. data/lib/oci/load_balancer/models/backend_set_health.rb +2 -2
  197. data/lib/oci/load_balancer/models/certificate.rb +2 -2
  198. data/lib/oci/load_balancer/models/certificate_details.rb +2 -2
  199. data/lib/oci/load_balancer/models/create_backend_details.rb +2 -2
  200. data/lib/oci/load_balancer/models/create_backend_set_details.rb +2 -2
  201. data/lib/oci/load_balancer/models/create_certificate_details.rb +2 -2
  202. data/lib/oci/load_balancer/models/create_listener_details.rb +2 -2
  203. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +2 -2
  204. data/lib/oci/load_balancer/models/health_check_result.rb +2 -2
  205. data/lib/oci/load_balancer/models/health_checker.rb +2 -2
  206. data/lib/oci/load_balancer/models/health_checker_details.rb +2 -2
  207. data/lib/oci/load_balancer/models/ip_address.rb +2 -2
  208. data/lib/oci/load_balancer/models/listener.rb +2 -2
  209. data/lib/oci/load_balancer/models/listener_details.rb +2 -2
  210. data/lib/oci/load_balancer/models/load_balancer.rb +2 -2
  211. data/lib/oci/load_balancer/models/load_balancer_health.rb +2 -2
  212. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +2 -2
  213. data/lib/oci/load_balancer/models/load_balancer_policy.rb +2 -2
  214. data/lib/oci/load_balancer/models/load_balancer_protocol.rb +2 -2
  215. data/lib/oci/load_balancer/models/load_balancer_shape.rb +2 -2
  216. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +2 -2
  217. data/lib/oci/load_balancer/models/ssl_configuration.rb +2 -2
  218. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +2 -2
  219. data/lib/oci/load_balancer/models/update_backend_details.rb +2 -2
  220. data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -2
  221. data/lib/oci/load_balancer/models/update_health_checker_details.rb +2 -2
  222. data/lib/oci/load_balancer/models/update_listener_details.rb +2 -2
  223. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +2 -2
  224. data/lib/oci/load_balancer/models/work_request.rb +2 -2
  225. data/lib/oci/load_balancer/models/work_request_error.rb +2 -2
  226. data/lib/oci/object_storage/models/bucket.rb +44 -12
  227. data/lib/oci/object_storage/models/bucket_summary.rb +6 -4
  228. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +2 -2
  229. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +2 -2
  230. data/lib/oci/object_storage/models/create_bucket_details.rb +41 -11
  231. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +9 -7
  232. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +6 -7
  233. data/lib/oci/object_storage/models/list_objects.rb +4 -3
  234. data/lib/oci/object_storage/models/multipart_upload.rb +3 -3
  235. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +6 -6
  236. data/lib/oci/object_storage/models/namespace_metadata.rb +142 -0
  237. data/lib/oci/object_storage/models/object_summary.rb +6 -4
  238. data/lib/oci/object_storage/models/preauthenticated_request.rb +13 -11
  239. data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +8 -10
  240. data/lib/oci/object_storage/models/rename_object_details.rb +164 -0
  241. data/lib/oci/object_storage/models/restore_objects_details.rb +120 -0
  242. data/lib/oci/object_storage/models/update_bucket_details.rb +20 -8
  243. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +131 -0
  244. data/lib/oci/object_storage/object_storage.rb +4 -0
  245. data/lib/oci/object_storage/object_storage_client.rb +206 -94
  246. data/lib/oci/regions.rb +2 -1
  247. data/lib/oci/version.rb +1 -1
  248. metadata +22 -2
@@ -0,0 +1,253 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Database::Models::BackupSummary
7
+
8
+ LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
9
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
10
+ LIFECYCLE_STATE_DELETING = 'DELETING',
11
+ LIFECYCLE_STATE_DELETED = 'DELETED',
12
+ LIFECYCLE_STATE_FAILED = 'FAILED',
13
+ LIFECYCLE_STATE_RESTORING = 'RESTORING',
14
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
15
+
16
+
17
+ TYPE_ENUM = [TYPE_INCREMENTAL = 'INCREMENTAL',
18
+ TYPE_FULL = 'FULL',
19
+ TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
20
+
21
+ # The name of the Availability Domain that the backup is located in.
22
+ # @return [String]
23
+ attr_accessor :availability_domain
24
+
25
+ # The OCID of the compartment.
26
+ # @return [String]
27
+ attr_accessor :compartment_id
28
+
29
+ # The OCID of the database.
30
+ # @return [String]
31
+ attr_accessor :database_id
32
+
33
+ # The user-friendly name for the backup. It does not have to be unique.
34
+ # @return [String]
35
+ attr_accessor :display_name
36
+
37
+ # The OCID of the backup.
38
+ # @return [String]
39
+ attr_accessor :id
40
+
41
+ # Additional information about the current lifecycleState.
42
+ # @return [String]
43
+ attr_accessor :lifecycle_details
44
+
45
+ # The current state of the backup.
46
+ # @return [String]
47
+ attr_accessor :lifecycle_state
48
+
49
+ # The date and time the backup was completed.
50
+ # @return [DateTime]
51
+ attr_accessor :time_ended
52
+
53
+ # The date and time the backup starts.
54
+ # @return [DateTime]
55
+ attr_accessor :time_started
56
+
57
+ # The type of backup.
58
+ # @return [String]
59
+ attr_accessor :type
60
+
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ return unless attributes.is_a?(Hash)
66
+
67
+ # convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
69
+
70
+ if attributes[:'availabilityDomain']
71
+ self.availability_domain = attributes[:'availabilityDomain']
72
+ end
73
+
74
+ if attributes[:'compartmentId']
75
+ self.compartment_id = attributes[:'compartmentId']
76
+ end
77
+
78
+ if attributes[:'databaseId']
79
+ self.database_id = attributes[:'databaseId']
80
+ end
81
+
82
+ if attributes[:'displayName']
83
+ self.display_name = attributes[:'displayName']
84
+ end
85
+
86
+ if attributes[:'id']
87
+ self.id = attributes[:'id']
88
+ end
89
+
90
+ if attributes[:'lifecycleDetails']
91
+ self.lifecycle_details = attributes[:'lifecycleDetails']
92
+ end
93
+
94
+ if attributes[:'lifecycleState']
95
+ self.lifecycle_state = attributes[:'lifecycleState']
96
+ end
97
+
98
+ if attributes[:'timeEnded']
99
+ self.time_ended = attributes[:'timeEnded']
100
+ end
101
+
102
+ if attributes[:'timeStarted']
103
+ self.time_started = attributes[:'timeStarted']
104
+ end
105
+
106
+ if attributes[:'type']
107
+ self.type = attributes[:'type']
108
+ end
109
+
110
+ end
111
+
112
+ # Custom attribute writer method checking allowed values (enum).
113
+ # @param [Object] lifecycle_state Object to be assigned
114
+ def lifecycle_state=(lifecycle_state)
115
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
116
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
117
+ else
118
+ @lifecycle_state = lifecycle_state
119
+ end
120
+ end
121
+
122
+ # Custom attribute writer method checking allowed values (enum).
123
+ # @param [Object] type Object to be assigned
124
+ def type=(type)
125
+ if type && !TYPE_ENUM.include?(type)
126
+ @type = TYPE_UNKNOWN_ENUM_VALUE
127
+ else
128
+ @type = type
129
+ end
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param [Object] other_object to be compared
134
+ def ==(other_object)
135
+ return true if self.equal?(other_object)
136
+ self.class == other_object.class &&
137
+ availability_domain == other_object.availability_domain &&
138
+ compartment_id == other_object.compartment_id &&
139
+ database_id == other_object.database_id &&
140
+ display_name == other_object.display_name &&
141
+ id == other_object.id &&
142
+ lifecycle_details == other_object.lifecycle_details &&
143
+ lifecycle_state == other_object.lifecycle_state &&
144
+ time_ended == other_object.time_ended &&
145
+ time_started == other_object.time_started &&
146
+ type == other_object.type
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] other_object to be compared
151
+ def eql?(other_object)
152
+ self == other_object
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Fixnum] Hash code
157
+ def hash
158
+ [availability_domain, compartment_id, database_id, display_name, id, lifecycle_details, lifecycle_state, time_ended, time_started, type].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ self.class.swagger_types.each_pair do |key, type|
167
+ if type =~ /^Array<(.*)>/i
168
+ # check to ensure the input is an array given that the the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
171
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
172
+ end
173
+ elsif !attributes[self.class.attribute_map[key]].nil?
174
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
175
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
176
+ end
177
+
178
+ self
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = send(attr)
193
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ private
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map{ |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+
220
+
221
+ # Attribute mapping from ruby-style variable name to JSON key.
222
+ def self.attribute_map
223
+ {
224
+ :'availability_domain' => :'availabilityDomain',
225
+ :'compartment_id' => :'compartmentId',
226
+ :'database_id' => :'databaseId',
227
+ :'display_name' => :'displayName',
228
+ :'id' => :'id',
229
+ :'lifecycle_details' => :'lifecycleDetails',
230
+ :'lifecycle_state' => :'lifecycleState',
231
+ :'time_ended' => :'timeEnded',
232
+ :'time_started' => :'timeStarted',
233
+ :'type' => :'type'
234
+ }
235
+ end
236
+
237
+ # Attribute type mapping.
238
+ def self.swagger_types
239
+ {
240
+ :'availability_domain' => :'String',
241
+ :'compartment_id' => :'String',
242
+ :'database_id' => :'String',
243
+ :'display_name' => :'String',
244
+ :'id' => :'String',
245
+ :'lifecycle_details' => :'String',
246
+ :'lifecycle_state' => :'String',
247
+ :'time_ended' => :'DateTime',
248
+ :'time_started' => :'DateTime',
249
+ :'type' => :'String'
250
+ }
251
+ end
252
+ end
253
+ end
@@ -0,0 +1,131 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Database::Models::CreateBackupDetails
7
+ # The OCID of the database.
8
+ # @return [String]
9
+ attr_accessor :database_id
10
+
11
+ # The user-friendly name for the backup. It does not have to be unique.
12
+ # @return [String]
13
+ attr_accessor :display_name
14
+
15
+
16
+ # Initializes the object
17
+ # @param [Hash] attributes Model attributes in the form of hash
18
+ def initialize(attributes = {})
19
+ return unless attributes.is_a?(Hash)
20
+
21
+ # convert string to symbol for hash key
22
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
23
+
24
+ if attributes[:'databaseId']
25
+ self.database_id = attributes[:'databaseId']
26
+ end
27
+
28
+ if attributes[:'displayName']
29
+ self.display_name = attributes[:'displayName']
30
+ end
31
+
32
+ end
33
+
34
+ # Checks equality by comparing each attribute.
35
+ # @param [Object] other_object to be compared
36
+ def ==(other_object)
37
+ return true if self.equal?(other_object)
38
+ self.class == other_object.class &&
39
+ database_id == other_object.database_id &&
40
+ display_name == other_object.display_name
41
+ end
42
+
43
+ # @see the `==` method
44
+ # @param [Object] other_object to be compared
45
+ def eql?(other_object)
46
+ self == other_object
47
+ end
48
+
49
+ # Calculates hash code according to all attributes.
50
+ # @return [Fixnum] Hash code
51
+ def hash
52
+ [database_id, display_name].hash
53
+ end
54
+
55
+ # Builds the object from hash
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ # @return [Object] Returns the model itself
58
+ def build_from_hash(attributes)
59
+ return nil unless attributes.is_a?(Hash)
60
+ self.class.swagger_types.each_pair do |key, type|
61
+ if type =~ /^Array<(.*)>/i
62
+ # check to ensure the input is an array given that the the attribute
63
+ # is documented as an array but the input is not
64
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
65
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
66
+ end
67
+ elsif !attributes[self.class.attribute_map[key]].nil?
68
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
69
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
70
+ end
71
+
72
+ self
73
+ end
74
+
75
+ # Returns the string representation of the object
76
+ # @return [String] String presentation of the object
77
+ def to_s
78
+ to_hash.to_s
79
+ end
80
+
81
+ # Returns the object in the form of hash
82
+ # @return [Hash] Returns the object in the form of hash
83
+ def to_hash
84
+ hash = {}
85
+ self.class.attribute_map.each_pair do |attr, param|
86
+ value = send(attr)
87
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
88
+ hash[param] = _to_hash(value)
89
+ end
90
+ hash
91
+ end
92
+
93
+ private
94
+
95
+ # Outputs non-array value in the form of hash
96
+ # For object, use to_hash. Otherwise, just return the value
97
+ # @param [Object] value Any valid value
98
+ # @return [Hash] Returns the value in the form of hash
99
+ def _to_hash(value)
100
+ if value.is_a?(Array)
101
+ value.compact.map{ |v| _to_hash(v) }
102
+ elsif value.is_a?(Hash)
103
+ {}.tap do |hash|
104
+ value.each { |k, v| hash[k] = _to_hash(v) }
105
+ end
106
+ elsif value.respond_to? :to_hash
107
+ value.to_hash
108
+ else
109
+ value
110
+ end
111
+ end
112
+
113
+
114
+
115
+ # Attribute mapping from ruby-style variable name to JSON key.
116
+ def self.attribute_map
117
+ {
118
+ :'database_id' => :'databaseId',
119
+ :'display_name' => :'displayName'
120
+ }
121
+ end
122
+
123
+ # Attribute type mapping.
124
+ def self.swagger_types
125
+ {
126
+ :'database_id' => :'String',
127
+ :'display_name' => :'String'
128
+ }
129
+ end
130
+ end
131
+ end
@@ -173,8 +173,8 @@ module OCI
173
173
  def to_hash
174
174
  hash = {}
175
175
  self.class.attribute_map.each_pair do |attr, param|
176
- value = self.send(attr)
177
- next if value.nil?
176
+ value = send(attr)
177
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
178
178
  hash[param] = _to_hash(value)
179
179
  end
180
180
  hash
@@ -84,8 +84,8 @@ module OCI
84
84
  def to_hash
85
85
  hash = {}
86
86
  self.class.attribute_map.each_pair do |attr, param|
87
- value = self.send(attr)
88
- next if value.nil?
87
+ value = send(attr)
88
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
89
89
  hash[param] = _to_hash(value)
90
90
  end
91
91
  hash
@@ -19,6 +19,9 @@ module OCI
19
19
  # @return [String]
20
20
  attr_accessor :character_set
21
21
 
22
+ # @return [OCI::Database::Models::DbBackupConfig]
23
+ attr_accessor :db_backup_config
24
+
22
25
  # The database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted.
23
26
  # @return [String]
24
27
  attr_accessor :db_name
@@ -54,6 +57,10 @@ module OCI
54
57
  self.character_set = attributes[:'characterSet']
55
58
  end
56
59
 
60
+ if attributes[:'dbBackupConfig']
61
+ self.db_backup_config = attributes[:'dbBackupConfig']
62
+ end
63
+
57
64
  if attributes[:'dbName']
58
65
  self.db_name = attributes[:'dbName']
59
66
  end
@@ -89,6 +96,7 @@ module OCI
89
96
  self.class == other_object.class &&
90
97
  admin_password == other_object.admin_password &&
91
98
  character_set == other_object.character_set &&
99
+ db_backup_config == other_object.db_backup_config &&
92
100
  db_name == other_object.db_name &&
93
101
  db_workload == other_object.db_workload &&
94
102
  ncharacter_set == other_object.ncharacter_set &&
@@ -104,7 +112,7 @@ module OCI
104
112
  # Calculates hash code according to all attributes.
105
113
  # @return [Fixnum] Hash code
106
114
  def hash
107
- [admin_password, character_set, db_name, db_workload, ncharacter_set, pdb_name].hash
115
+ [admin_password, character_set, db_backup_config, db_name, db_workload, ncharacter_set, pdb_name].hash
108
116
  end
109
117
 
110
118
  # Builds the object from hash
@@ -138,8 +146,8 @@ module OCI
138
146
  def to_hash
139
147
  hash = {}
140
148
  self.class.attribute_map.each_pair do |attr, param|
141
- value = self.send(attr)
142
- next if value.nil?
149
+ value = send(attr)
150
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
143
151
  hash[param] = _to_hash(value)
144
152
  end
145
153
  hash
@@ -172,6 +180,7 @@ module OCI
172
180
  {
173
181
  :'admin_password' => :'adminPassword',
174
182
  :'character_set' => :'characterSet',
183
+ :'db_backup_config' => :'dbBackupConfig',
175
184
  :'db_name' => :'dbName',
176
185
  :'db_workload' => :'dbWorkload',
177
186
  :'ncharacter_set' => :'ncharacterSet',
@@ -184,6 +193,7 @@ module OCI
184
193
  {
185
194
  :'admin_password' => :'String',
186
195
  :'character_set' => :'String',
196
+ :'db_backup_config' => :'OCI::Database::Models::DbBackupConfig',
187
197
  :'db_name' => :'String',
188
198
  :'db_workload' => :'String',
189
199
  :'ncharacter_set' => :'String',