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
@@ -6,6 +6,7 @@ module OCI
6
6
  class Database::Models::PatchHistoryEntry
7
7
 
8
8
  ACTION_ENUM = [ACTION_APPLY = 'APPLY',
9
+ ACTION_PRECHECK = 'PRECHECK',
9
10
  ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
10
11
 
11
12
 
@@ -160,8 +161,8 @@ module OCI
160
161
  def to_hash
161
162
  hash = {}
162
163
  self.class.attribute_map.each_pair do |attr, param|
163
- value = self.send(attr)
164
- next if value.nil?
164
+ value = send(attr)
165
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
165
166
  hash[param] = _to_hash(value)
166
167
  end
167
168
  hash
@@ -6,6 +6,7 @@ module OCI
6
6
  class Database::Models::PatchHistoryEntrySummary
7
7
 
8
8
  ACTION_ENUM = [ACTION_APPLY = 'APPLY',
9
+ ACTION_PRECHECK = 'PRECHECK',
9
10
  ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
10
11
 
11
12
 
@@ -160,8 +161,8 @@ module OCI
160
161
  def to_hash
161
162
  hash = {}
162
163
  self.class.attribute_map.each_pair do |attr, param|
163
- value = self.send(attr)
164
- next if value.nil?
164
+ value = send(attr)
165
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
165
166
  hash[param] = _to_hash(value)
166
167
  end
167
168
  hash
@@ -6,10 +6,12 @@ module OCI
6
6
  class Database::Models::PatchSummary
7
7
 
8
8
  AVAILABLE_ACTIONS_ENUM = [AVAILABLE_ACTIONS_APPLY = 'APPLY',
9
+ AVAILABLE_ACTIONS_PRECHECK = 'PRECHECK',
9
10
  AVAILABLE_ACTIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
10
11
 
11
12
 
12
13
  LAST_ACTION_ENUM = [LAST_ACTION_APPLY = 'APPLY',
14
+ LAST_ACTION_PRECHECK = 'PRECHECK',
13
15
  LAST_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
14
16
 
15
17
 
@@ -187,8 +189,8 @@ module OCI
187
189
  def to_hash
188
190
  hash = {}
189
191
  self.class.attribute_map.each_pair do |attr, param|
190
- value = self.send(attr)
191
- next if value.nil?
192
+ value = send(attr)
193
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
192
194
  hash[param] = _to_hash(value)
193
195
  end
194
196
  hash
@@ -74,8 +74,8 @@ module OCI
74
74
  def to_hash
75
75
  hash = {}
76
76
  self.class.attribute_map.each_pair do |attr, param|
77
- value = self.send(attr)
78
- next if value.nil?
77
+ value = send(attr)
78
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
79
79
  hash[param] = _to_hash(value)
80
80
  end
81
81
  hash
@@ -0,0 +1,145 @@
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::RestoreDatabaseDetails
7
+ # Restores using the backup with the System Change Number (SCN) specified.
8
+ #
9
+ # @return [String]
10
+ attr_accessor :database_scn
11
+
12
+ # Restores to the last known good state with the least possible data loss.
13
+ #
14
+ # @return [BOOLEAN]
15
+ attr_accessor :latest
16
+
17
+ # Restores to the timestamp specified.
18
+ #
19
+ # @return [DateTime]
20
+ attr_accessor :timestamp
21
+
22
+
23
+ # Initializes the object
24
+ # @param [Hash] attributes Model attributes in the form of hash
25
+ def initialize(attributes = {})
26
+ return unless attributes.is_a?(Hash)
27
+
28
+ # convert string to symbol for hash key
29
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
30
+
31
+ if attributes[:'databaseSCN']
32
+ self.database_scn = attributes[:'databaseSCN']
33
+ end
34
+
35
+ if attributes[:'latest']
36
+ self.latest = attributes[:'latest']
37
+ end
38
+
39
+ if attributes[:'timestamp']
40
+ self.timestamp = attributes[:'timestamp']
41
+ end
42
+
43
+ end
44
+
45
+ # Checks equality by comparing each attribute.
46
+ # @param [Object] other_object to be compared
47
+ def ==(other_object)
48
+ return true if self.equal?(other_object)
49
+ self.class == other_object.class &&
50
+ database_scn == other_object.database_scn &&
51
+ latest == other_object.latest &&
52
+ timestamp == other_object.timestamp
53
+ end
54
+
55
+ # @see the `==` method
56
+ # @param [Object] other_object to be compared
57
+ def eql?(other_object)
58
+ self == other_object
59
+ end
60
+
61
+ # Calculates hash code according to all attributes.
62
+ # @return [Fixnum] Hash code
63
+ def hash
64
+ [database_scn, latest, timestamp].hash
65
+ end
66
+
67
+ # Builds the object from hash
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ # @return [Object] Returns the model itself
70
+ def build_from_hash(attributes)
71
+ return nil unless attributes.is_a?(Hash)
72
+ self.class.swagger_types.each_pair do |key, type|
73
+ if type =~ /^Array<(.*)>/i
74
+ # check to ensure the input is an array given that the the attribute
75
+ # is documented as an array but the input is not
76
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
77
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
78
+ end
79
+ elsif !attributes[self.class.attribute_map[key]].nil?
80
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
81
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
82
+ end
83
+
84
+ self
85
+ end
86
+
87
+ # Returns the string representation of the object
88
+ # @return [String] String presentation of the object
89
+ def to_s
90
+ to_hash.to_s
91
+ end
92
+
93
+ # Returns the object in the form of hash
94
+ # @return [Hash] Returns the object in the form of hash
95
+ def to_hash
96
+ hash = {}
97
+ self.class.attribute_map.each_pair do |attr, param|
98
+ value = send(attr)
99
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
100
+ hash[param] = _to_hash(value)
101
+ end
102
+ hash
103
+ end
104
+
105
+ private
106
+
107
+ # Outputs non-array value in the form of hash
108
+ # For object, use to_hash. Otherwise, just return the value
109
+ # @param [Object] value Any valid value
110
+ # @return [Hash] Returns the value in the form of hash
111
+ def _to_hash(value)
112
+ if value.is_a?(Array)
113
+ value.compact.map{ |v| _to_hash(v) }
114
+ elsif value.is_a?(Hash)
115
+ {}.tap do |hash|
116
+ value.each { |k, v| hash[k] = _to_hash(v) }
117
+ end
118
+ elsif value.respond_to? :to_hash
119
+ value.to_hash
120
+ else
121
+ value
122
+ end
123
+ end
124
+
125
+
126
+
127
+ # Attribute mapping from ruby-style variable name to JSON key.
128
+ def self.attribute_map
129
+ {
130
+ :'database_scn' => :'databaseSCN',
131
+ :'latest' => :'latest',
132
+ :'timestamp' => :'timestamp'
133
+ }
134
+ end
135
+
136
+ # Attribute type mapping.
137
+ def self.swagger_types
138
+ {
139
+ :'database_scn' => :'String',
140
+ :'latest' => :'BOOLEAN',
141
+ :'timestamp' => :'DateTime'
142
+ }
143
+ end
144
+ end
145
+ end
@@ -74,8 +74,8 @@ module OCI
74
74
  def to_hash
75
75
  hash = {}
76
76
  self.class.attribute_map.each_pair do |attr, param|
77
- value = self.send(attr)
78
- next if value.nil?
77
+ value = send(attr)
78
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
79
79
  hash[param] = _to_hash(value)
80
80
  end
81
81
  hash
@@ -0,0 +1,119 @@
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::UpdateDatabaseDetails
7
+ # @return [OCI::Database::Models::DbBackupConfig]
8
+ attr_accessor :db_backup_config
9
+
10
+
11
+ # Initializes the object
12
+ # @param [Hash] attributes Model attributes in the form of hash
13
+ def initialize(attributes = {})
14
+ return unless attributes.is_a?(Hash)
15
+
16
+ # convert string to symbol for hash key
17
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
18
+
19
+ if attributes[:'dbBackupConfig']
20
+ self.db_backup_config = attributes[:'dbBackupConfig']
21
+ end
22
+
23
+ end
24
+
25
+ # Checks equality by comparing each attribute.
26
+ # @param [Object] other_object to be compared
27
+ def ==(other_object)
28
+ return true if self.equal?(other_object)
29
+ self.class == other_object.class &&
30
+ db_backup_config == other_object.db_backup_config
31
+ end
32
+
33
+ # @see the `==` method
34
+ # @param [Object] other_object to be compared
35
+ def eql?(other_object)
36
+ self == other_object
37
+ end
38
+
39
+ # Calculates hash code according to all attributes.
40
+ # @return [Fixnum] Hash code
41
+ def hash
42
+ [db_backup_config].hash
43
+ end
44
+
45
+ # Builds the object from hash
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ # @return [Object] Returns the model itself
48
+ def build_from_hash(attributes)
49
+ return nil unless attributes.is_a?(Hash)
50
+ self.class.swagger_types.each_pair do |key, type|
51
+ if type =~ /^Array<(.*)>/i
52
+ # check to ensure the input is an array given that the the attribute
53
+ # is documented as an array but the input is not
54
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
55
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
56
+ end
57
+ elsif !attributes[self.class.attribute_map[key]].nil?
58
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
59
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
60
+ end
61
+
62
+ self
63
+ end
64
+
65
+ # Returns the string representation of the object
66
+ # @return [String] String presentation of the object
67
+ def to_s
68
+ to_hash.to_s
69
+ end
70
+
71
+ # Returns the object in the form of hash
72
+ # @return [Hash] Returns the object in the form of hash
73
+ def to_hash
74
+ hash = {}
75
+ self.class.attribute_map.each_pair do |attr, param|
76
+ value = send(attr)
77
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
78
+ hash[param] = _to_hash(value)
79
+ end
80
+ hash
81
+ end
82
+
83
+ private
84
+
85
+ # Outputs non-array value in the form of hash
86
+ # For object, use to_hash. Otherwise, just return the value
87
+ # @param [Object] value Any valid value
88
+ # @return [Hash] Returns the value in the form of hash
89
+ def _to_hash(value)
90
+ if value.is_a?(Array)
91
+ value.compact.map{ |v| _to_hash(v) }
92
+ elsif value.is_a?(Hash)
93
+ {}.tap do |hash|
94
+ value.each { |k, v| hash[k] = _to_hash(v) }
95
+ end
96
+ elsif value.respond_to? :to_hash
97
+ value.to_hash
98
+ else
99
+ value
100
+ end
101
+ end
102
+
103
+
104
+
105
+ # Attribute mapping from ruby-style variable name to JSON key.
106
+ def self.attribute_map
107
+ {
108
+ :'db_backup_config' => :'dbBackupConfig'
109
+ }
110
+ end
111
+
112
+ # Attribute type mapping.
113
+ def self.swagger_types
114
+ {
115
+ :'db_backup_config' => :'OCI::Database::Models::DbBackupConfig'
116
+ }
117
+ end
118
+ end
119
+ end
@@ -73,8 +73,8 @@ module OCI
73
73
  def to_hash
74
74
  hash = {}
75
75
  self.class.attribute_map.each_pair do |attr, param|
76
- value = self.send(attr)
77
- next if value.nil?
76
+ value = send(attr)
77
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
78
78
  hash[param] = _to_hash(value)
79
79
  end
80
80
  hash
@@ -11,7 +11,7 @@ module OCI
11
11
  # Size, in GBs, to which the currently attached storage needs to be scaled up to for VM based DB system. This must be greater than current storage size. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume.
12
12
  #
13
13
  # @return [Integer]
14
- attr_accessor :data_storage_size_in_gb
14
+ attr_accessor :data_storage_size_in_gbs
15
15
 
16
16
  # The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters.
17
17
  # @return [Array<String>]
@@ -33,8 +33,8 @@ module OCI
33
33
  self.cpu_core_count = attributes[:'cpuCoreCount']
34
34
  end
35
35
 
36
- if attributes[:'dataStorageSizeInGB']
37
- self.data_storage_size_in_gb = attributes[:'dataStorageSizeInGB']
36
+ if attributes[:'dataStorageSizeInGBs']
37
+ self.data_storage_size_in_gbs = attributes[:'dataStorageSizeInGBs']
38
38
  end
39
39
 
40
40
  if attributes[:'sshPublicKeys']
@@ -53,7 +53,7 @@ module OCI
53
53
  return true if self.equal?(other_object)
54
54
  self.class == other_object.class &&
55
55
  cpu_core_count == other_object.cpu_core_count &&
56
- data_storage_size_in_gb == other_object.data_storage_size_in_gb &&
56
+ data_storage_size_in_gbs == other_object.data_storage_size_in_gbs &&
57
57
  ssh_public_keys == other_object.ssh_public_keys &&
58
58
  version == other_object.version
59
59
  end
@@ -67,7 +67,7 @@ module OCI
67
67
  # Calculates hash code according to all attributes.
68
68
  # @return [Fixnum] Hash code
69
69
  def hash
70
- [cpu_core_count, data_storage_size_in_gb, ssh_public_keys, version].hash
70
+ [cpu_core_count, data_storage_size_in_gbs, ssh_public_keys, version].hash
71
71
  end
72
72
 
73
73
  # Builds the object from hash
@@ -101,8 +101,8 @@ module OCI
101
101
  def to_hash
102
102
  hash = {}
103
103
  self.class.attribute_map.each_pair do |attr, param|
104
- value = self.send(attr)
105
- next if value.nil?
104
+ value = send(attr)
105
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
106
106
  hash[param] = _to_hash(value)
107
107
  end
108
108
  hash
@@ -134,7 +134,7 @@ module OCI
134
134
  def self.attribute_map
135
135
  {
136
136
  :'cpu_core_count' => :'cpuCoreCount',
137
- :'data_storage_size_in_gb' => :'dataStorageSizeInGB',
137
+ :'data_storage_size_in_gbs' => :'dataStorageSizeInGBs',
138
138
  :'ssh_public_keys' => :'sshPublicKeys',
139
139
  :'version' => :'version'
140
140
  }
@@ -144,7 +144,7 @@ module OCI
144
144
  def self.swagger_types
145
145
  {
146
146
  :'cpu_core_count' => :'Integer',
147
- :'data_storage_size_in_gb' => :'Integer',
147
+ :'data_storage_size_in_gbs' => :'Integer',
148
148
  :'ssh_public_keys' => :'Array<String>',
149
149
  :'version' => :'OCI::Database::Models::PatchDetails'
150
150
  }
@@ -102,14 +102,14 @@ module OCI
102
102
 
103
103
  # Creates a new compartment in your tenancy.
104
104
  #
105
- # **Important:** Compartments cannot be renamed or deleted.
105
+ # **Important:** Compartments cannot be deleted.
106
106
  #
107
107
  # You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy
108
108
  # is simply the root compartment. For information about OCIDs, see
109
109
  # [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
110
110
  #
111
111
  # You must also specify a *name* for the compartment, which must be unique across all compartments in
112
- # your tenancy and cannot be changed. You can use this name or the OCID when writing policies that apply
112
+ # your tenancy. You can use this name or the OCID when writing policies that apply
113
113
  # to the compartment. For more information about policies, see
114
114
  # [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
115
115
  #
@@ -589,7 +589,7 @@ module OCI
589
589
  # {#add_user_to_group add_user_to_group}). If the user needs to
590
590
  # access the Console, you need to provide the user a password (see
591
591
  # {#create_or_reset_ui_password create_or_reset_ui_password}).
592
- # If the user needs to access the Oracle Bare Metal Cloud Services REST API, you need to upload a
592
+ # If the user needs to access the Oracle Cloud Infrastructure REST API, you need to upload a
593
593
  # public API signing key for that user (see
594
594
  # [Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also
595
595
  # {#upload_api_key upload_api_key}).
@@ -1389,6 +1389,7 @@ module OCI
1389
1389
  # See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1390
1390
  #
1391
1391
  # @param [String] protocol The protocol used for federation.
1392
+ # Allowed values are: SAML2
1392
1393
  # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1393
1394
  #
1394
1395
  # @param [Hash] opts the optional parameters
@@ -1545,7 +1546,7 @@ module OCI
1545
1546
  :return_type => 'Array<OCI::Identity::Models::RegionSubscription>')
1546
1547
  end
1547
1548
 
1548
- # Lists all the regions offered by Oracle Bare Metal Cloud Services.
1549
+ # Lists all the regions offered by Oracle Cloud Infrastructure.
1549
1550
  # @param [Hash] opts the optional parameters
1550
1551
  # @return [Response] A Response object with data of type Array<OCI::Identity::Models::Region>
1551
1552
  def list_regions(opts = {})
@@ -1736,7 +1737,7 @@ module OCI
1736
1737
  :body => post_body)
1737
1738
  end
1738
1739
 
1739
- # Updates the specified compartment's description.
1740
+ # Updates the specified compartment's description or name. You can't update the root compartment.
1740
1741
  # @param [String] compartment_id The OCID of the compartment.
1741
1742
  # @param [UpdateCompartmentDetails] update_compartment_details Request object for updating a compartment.
1742
1743
  # @param [Hash] opts the optional parameters