oci 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/audit/models/audit_event.rb +3 -3
  4. data/lib/oci/audit/models/configuration.rb +3 -3
  5. data/lib/oci/audit/models/update_configuration_details.rb +3 -3
  6. data/lib/oci/core/blockstorage_client.rb +155 -0
  7. data/lib/oci/core/compute_client.rb +176 -12
  8. data/lib/oci/core/core.rb +11 -0
  9. data/lib/oci/core/models/attach_boot_volume_details.rb +143 -0
  10. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +3 -3
  11. data/lib/oci/core/models/attach_vnic_details.rb +23 -7
  12. data/lib/oci/core/models/attach_volume_details.rb +3 -3
  13. data/lib/oci/core/models/boot_volume.rb +234 -0
  14. data/lib/oci/core/models/boot_volume_attachment.rb +224 -0
  15. data/lib/oci/core/models/capture_console_history_details.rb +3 -3
  16. data/lib/oci/core/models/connect_local_peering_gateways_details.rb +120 -0
  17. data/lib/oci/core/models/console_history.rb +3 -3
  18. data/lib/oci/core/models/cpe.rb +3 -3
  19. data/lib/oci/core/models/create_cpe_details.rb +3 -3
  20. data/lib/oci/core/models/create_cross_connect_details.rb +3 -3
  21. data/lib/oci/core/models/create_cross_connect_group_details.rb +3 -3
  22. data/lib/oci/core/models/create_dhcp_details.rb +3 -3
  23. data/lib/oci/core/models/create_drg_attachment_details.rb +3 -3
  24. data/lib/oci/core/models/create_drg_details.rb +3 -3
  25. data/lib/oci/core/models/create_image_details.rb +3 -3
  26. data/lib/oci/core/models/create_instance_console_connection_details.rb +5 -5
  27. data/lib/oci/core/models/create_internet_gateway_details.rb +3 -3
  28. data/lib/oci/core/models/create_ip_sec_connection_details.rb +3 -3
  29. data/lib/oci/core/models/create_local_peering_gateway_details.rb +144 -0
  30. data/lib/oci/core/models/create_private_ip_details.rb +3 -3
  31. data/lib/oci/core/models/create_route_table_details.rb +3 -3
  32. data/lib/oci/core/models/create_security_list_details.rb +3 -3
  33. data/lib/oci/core/models/create_subnet_details.rb +3 -3
  34. data/lib/oci/core/models/create_vcn_details.rb +3 -3
  35. data/lib/oci/core/models/create_virtual_circuit_details.rb +3 -3
  36. data/lib/oci/core/models/create_vnic_details.rb +3 -3
  37. data/lib/oci/core/models/create_volume_backup_details.rb +3 -3
  38. data/lib/oci/core/models/create_volume_details.rb +3 -3
  39. data/lib/oci/core/models/cross_connect.rb +3 -3
  40. data/lib/oci/core/models/cross_connect_group.rb +3 -3
  41. data/lib/oci/core/models/cross_connect_location.rb +3 -3
  42. data/lib/oci/core/models/cross_connect_mapping.rb +3 -3
  43. data/lib/oci/core/models/cross_connect_port_speed_shape.rb +3 -3
  44. data/lib/oci/core/models/cross_connect_status.rb +3 -3
  45. data/lib/oci/core/models/dhcp_dns_option.rb +3 -3
  46. data/lib/oci/core/models/dhcp_option.rb +3 -3
  47. data/lib/oci/core/models/dhcp_options.rb +3 -3
  48. data/lib/oci/core/models/dhcp_search_domain_option.rb +3 -3
  49. data/lib/oci/core/models/drg.rb +3 -3
  50. data/lib/oci/core/models/drg_attachment.rb +3 -3
  51. data/lib/oci/core/models/egress_security_rule.rb +3 -3
  52. data/lib/oci/core/models/export_image_details.rb +3 -3
  53. data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +3 -3
  54. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +3 -3
  55. data/lib/oci/core/models/fast_connect_provider_service.rb +3 -3
  56. data/lib/oci/core/models/i_scsi_volume_attachment.rb +3 -3
  57. data/lib/oci/core/models/icmp_options.rb +3 -3
  58. data/lib/oci/core/models/image.rb +3 -3
  59. data/lib/oci/core/models/image_source_details.rb +3 -3
  60. data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +3 -3
  61. data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +3 -3
  62. data/lib/oci/core/models/ingress_security_rule.rb +3 -3
  63. data/lib/oci/core/models/instance.rb +16 -6
  64. data/lib/oci/core/models/instance_console_connection.rb +9 -9
  65. data/lib/oci/core/models/instance_credentials.rb +3 -3
  66. data/lib/oci/core/models/instance_source_details.rb +135 -0
  67. data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +128 -0
  68. data/lib/oci/core/models/instance_source_via_image_details.rb +128 -0
  69. data/lib/oci/core/models/internet_gateway.rb +3 -3
  70. data/lib/oci/core/models/ip_sec_connection.rb +3 -3
  71. data/lib/oci/core/models/ip_sec_connection_device_config.rb +3 -3
  72. data/lib/oci/core/models/ip_sec_connection_device_status.rb +3 -3
  73. data/lib/oci/core/models/launch_instance_details.rb +19 -6
  74. data/lib/oci/core/models/letter_of_authority.rb +3 -3
  75. data/lib/oci/core/models/local_peering_gateway.rb +271 -0
  76. data/lib/oci/core/models/port_range.rb +3 -3
  77. data/lib/oci/core/models/private_ip.rb +3 -3
  78. data/lib/oci/core/models/route_rule.rb +3 -3
  79. data/lib/oci/core/models/route_table.rb +3 -3
  80. data/lib/oci/core/models/security_list.rb +3 -3
  81. data/lib/oci/core/models/shape.rb +3 -3
  82. data/lib/oci/core/models/subnet.rb +3 -3
  83. data/lib/oci/core/models/tcp_options.rb +3 -3
  84. data/lib/oci/core/models/tunnel_config.rb +3 -3
  85. data/lib/oci/core/models/tunnel_status.rb +3 -3
  86. data/lib/oci/core/models/udp_options.rb +3 -3
  87. data/lib/oci/core/models/update_boot_volume_details.rb +122 -0
  88. data/lib/oci/core/models/update_console_history_details.rb +3 -3
  89. data/lib/oci/core/models/update_cpe_details.rb +3 -3
  90. data/lib/oci/core/models/update_cross_connect_details.rb +3 -3
  91. data/lib/oci/core/models/update_cross_connect_group_details.rb +3 -3
  92. data/lib/oci/core/models/update_dhcp_details.rb +3 -3
  93. data/lib/oci/core/models/update_drg_attachment_details.rb +3 -3
  94. data/lib/oci/core/models/update_drg_details.rb +3 -3
  95. data/lib/oci/core/models/update_image_details.rb +3 -3
  96. data/lib/oci/core/models/update_instance_details.rb +3 -3
  97. data/lib/oci/core/models/update_internet_gateway_details.rb +3 -3
  98. data/lib/oci/core/models/update_ip_sec_connection_details.rb +3 -3
  99. data/lib/oci/core/models/update_local_peering_gateway_details.rb +122 -0
  100. data/lib/oci/core/models/update_private_ip_details.rb +3 -3
  101. data/lib/oci/core/models/update_route_table_details.rb +3 -3
  102. data/lib/oci/core/models/update_security_list_details.rb +3 -3
  103. data/lib/oci/core/models/update_subnet_details.rb +3 -3
  104. data/lib/oci/core/models/update_vcn_details.rb +3 -3
  105. data/lib/oci/core/models/update_virtual_circuit_details.rb +3 -3
  106. data/lib/oci/core/models/update_vnic_details.rb +3 -3
  107. data/lib/oci/core/models/update_volume_backup_details.rb +3 -3
  108. data/lib/oci/core/models/update_volume_details.rb +3 -3
  109. data/lib/oci/core/models/vcn.rb +3 -3
  110. data/lib/oci/core/models/virtual_circuit.rb +3 -3
  111. data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +3 -3
  112. data/lib/oci/core/models/vnic.rb +3 -3
  113. data/lib/oci/core/models/vnic_attachment.rb +20 -4
  114. data/lib/oci/core/models/volume.rb +3 -3
  115. data/lib/oci/core/models/volume_attachment.rb +3 -3
  116. data/lib/oci/core/models/volume_backup.rb +3 -3
  117. data/lib/oci/core/models/volume_source_details.rb +3 -3
  118. data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +3 -3
  119. data/lib/oci/core/models/volume_source_from_volume_details.rb +3 -3
  120. data/lib/oci/core/virtual_network_client.rb +233 -0
  121. data/lib/oci/database/database.rb +3 -0
  122. data/lib/oci/database/database_client.rb +1 -1
  123. data/lib/oci/database/models/backup.rb +3 -3
  124. data/lib/oci/database/models/backup_summary.rb +3 -3
  125. data/lib/oci/database/models/create_backup_details.rb +3 -3
  126. data/lib/oci/database/models/create_data_guard_association_details.rb +3 -3
  127. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +3 -3
  128. data/lib/oci/database/models/create_database_details.rb +3 -3
  129. data/lib/oci/database/models/create_database_from_backup_details.rb +142 -0
  130. data/lib/oci/database/models/create_db_home_details.rb +3 -3
  131. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +173 -0
  132. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +22 -30
  133. data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +133 -0
  134. data/lib/oci/database/models/data_guard_association.rb +3 -3
  135. data/lib/oci/database/models/data_guard_association_summary.rb +3 -3
  136. data/lib/oci/database/models/database.rb +3 -3
  137. data/lib/oci/database/models/database_summary.rb +3 -3
  138. data/lib/oci/database/models/db_backup_config.rb +3 -3
  139. data/lib/oci/database/models/db_home.rb +3 -3
  140. data/lib/oci/database/models/db_home_summary.rb +3 -3
  141. data/lib/oci/database/models/db_node.rb +3 -3
  142. data/lib/oci/database/models/db_node_summary.rb +3 -3
  143. data/lib/oci/database/models/db_system.rb +3 -3
  144. data/lib/oci/database/models/db_system_shape_summary.rb +3 -3
  145. data/lib/oci/database/models/db_system_summary.rb +3 -3
  146. data/lib/oci/database/models/db_version_summary.rb +3 -3
  147. data/lib/oci/database/models/failover_data_guard_association_details.rb +3 -3
  148. data/lib/oci/database/models/launch_db_system_details.rb +3 -3
  149. data/lib/oci/database/models/patch.rb +3 -3
  150. data/lib/oci/database/models/patch_details.rb +3 -3
  151. data/lib/oci/database/models/patch_history_entry.rb +3 -3
  152. data/lib/oci/database/models/patch_history_entry_summary.rb +3 -3
  153. data/lib/oci/database/models/patch_summary.rb +3 -3
  154. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +3 -3
  155. data/lib/oci/database/models/restore_database_details.rb +3 -3
  156. data/lib/oci/database/models/switchover_data_guard_association_details.rb +3 -3
  157. data/lib/oci/database/models/update_database_details.rb +3 -3
  158. data/lib/oci/database/models/update_db_home_details.rb +3 -3
  159. data/lib/oci/database/models/update_db_system_details.rb +3 -3
  160. data/lib/oci/identity/models/add_user_to_group_details.rb +3 -3
  161. data/lib/oci/identity/models/api_key.rb +3 -3
  162. data/lib/oci/identity/models/availability_domain.rb +3 -3
  163. data/lib/oci/identity/models/compartment.rb +3 -3
  164. data/lib/oci/identity/models/create_api_key_details.rb +3 -3
  165. data/lib/oci/identity/models/create_compartment_details.rb +3 -3
  166. data/lib/oci/identity/models/create_customer_secret_key_details.rb +3 -3
  167. data/lib/oci/identity/models/create_group_details.rb +3 -3
  168. data/lib/oci/identity/models/create_identity_provider_details.rb +3 -3
  169. data/lib/oci/identity/models/create_idp_group_mapping_details.rb +3 -3
  170. data/lib/oci/identity/models/create_policy_details.rb +3 -3
  171. data/lib/oci/identity/models/create_region_subscription_details.rb +3 -3
  172. data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +3 -3
  173. data/lib/oci/identity/models/create_swift_password_details.rb +3 -3
  174. data/lib/oci/identity/models/create_user_details.rb +3 -3
  175. data/lib/oci/identity/models/customer_secret_key.rb +3 -3
  176. data/lib/oci/identity/models/customer_secret_key_summary.rb +3 -3
  177. data/lib/oci/identity/models/group.rb +3 -3
  178. data/lib/oci/identity/models/identity_provider.rb +3 -3
  179. data/lib/oci/identity/models/idp_group_mapping.rb +3 -3
  180. data/lib/oci/identity/models/policy.rb +3 -3
  181. data/lib/oci/identity/models/region.rb +3 -3
  182. data/lib/oci/identity/models/region_subscription.rb +3 -3
  183. data/lib/oci/identity/models/saml2_identity_provider.rb +3 -3
  184. data/lib/oci/identity/models/swift_password.rb +3 -3
  185. data/lib/oci/identity/models/tenancy.rb +3 -3
  186. data/lib/oci/identity/models/ui_password.rb +3 -3
  187. data/lib/oci/identity/models/update_compartment_details.rb +3 -3
  188. data/lib/oci/identity/models/update_customer_secret_key_details.rb +3 -3
  189. data/lib/oci/identity/models/update_group_details.rb +3 -3
  190. data/lib/oci/identity/models/update_identity_provider_details.rb +3 -3
  191. data/lib/oci/identity/models/update_idp_group_mapping_details.rb +3 -3
  192. data/lib/oci/identity/models/update_policy_details.rb +3 -3
  193. data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +3 -3
  194. data/lib/oci/identity/models/update_state_details.rb +3 -3
  195. data/lib/oci/identity/models/update_swift_password_details.rb +3 -3
  196. data/lib/oci/identity/models/update_user_details.rb +3 -3
  197. data/lib/oci/identity/models/user.rb +3 -3
  198. data/lib/oci/identity/models/user_group_membership.rb +3 -3
  199. data/lib/oci/load_balancer/load_balancer_client.rb +27 -1
  200. data/lib/oci/load_balancer/models/backend.rb +3 -3
  201. data/lib/oci/load_balancer/models/backend_details.rb +3 -3
  202. data/lib/oci/load_balancer/models/backend_health.rb +4 -4
  203. data/lib/oci/load_balancer/models/backend_set.rb +5 -6
  204. data/lib/oci/load_balancer/models/backend_set_details.rb +5 -6
  205. data/lib/oci/load_balancer/models/backend_set_health.rb +3 -3
  206. data/lib/oci/load_balancer/models/certificate.rb +3 -3
  207. data/lib/oci/load_balancer/models/certificate_details.rb +3 -3
  208. data/lib/oci/load_balancer/models/create_backend_details.rb +3 -3
  209. data/lib/oci/load_balancer/models/create_backend_set_details.rb +5 -5
  210. data/lib/oci/load_balancer/models/create_certificate_details.rb +3 -3
  211. data/lib/oci/load_balancer/models/create_listener_details.rb +3 -3
  212. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +4 -4
  213. data/lib/oci/load_balancer/models/health_check_result.rb +3 -3
  214. data/lib/oci/load_balancer/models/health_checker.rb +3 -3
  215. data/lib/oci/load_balancer/models/health_checker_details.rb +3 -3
  216. data/lib/oci/load_balancer/models/ip_address.rb +3 -3
  217. data/lib/oci/load_balancer/models/listener.rb +3 -3
  218. data/lib/oci/load_balancer/models/listener_details.rb +3 -3
  219. data/lib/oci/load_balancer/models/load_balancer.rb +6 -4
  220. data/lib/oci/load_balancer/models/load_balancer_health.rb +5 -5
  221. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +3 -3
  222. data/lib/oci/load_balancer/models/load_balancer_policy.rb +3 -3
  223. data/lib/oci/load_balancer/models/load_balancer_protocol.rb +3 -3
  224. data/lib/oci/load_balancer/models/load_balancer_shape.rb +3 -3
  225. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +3 -3
  226. data/lib/oci/load_balancer/models/ssl_configuration.rb +3 -3
  227. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +3 -3
  228. data/lib/oci/load_balancer/models/update_backend_details.rb +3 -3
  229. data/lib/oci/load_balancer/models/update_backend_set_details.rb +5 -6
  230. data/lib/oci/load_balancer/models/update_health_checker_details.rb +3 -3
  231. data/lib/oci/load_balancer/models/update_listener_details.rb +3 -3
  232. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +3 -3
  233. data/lib/oci/load_balancer/models/work_request.rb +5 -3
  234. data/lib/oci/load_balancer/models/work_request_error.rb +3 -3
  235. data/lib/oci/object_storage/models/bucket.rb +3 -3
  236. data/lib/oci/object_storage/models/bucket_summary.rb +3 -3
  237. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +3 -3
  238. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +3 -3
  239. data/lib/oci/object_storage/models/create_bucket_details.rb +3 -3
  240. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +3 -3
  241. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +3 -3
  242. data/lib/oci/object_storage/models/list_objects.rb +3 -3
  243. data/lib/oci/object_storage/models/multipart_upload.rb +3 -3
  244. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +3 -3
  245. data/lib/oci/object_storage/models/namespace_metadata.rb +3 -3
  246. data/lib/oci/object_storage/models/object_summary.rb +3 -3
  247. data/lib/oci/object_storage/models/preauthenticated_request.rb +3 -3
  248. data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +3 -3
  249. data/lib/oci/object_storage/models/rename_object_details.rb +3 -3
  250. data/lib/oci/object_storage/models/restore_objects_details.rb +3 -3
  251. data/lib/oci/object_storage/models/update_bucket_details.rb +3 -3
  252. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +3 -3
  253. data/lib/oci/version.rb +1 -1
  254. metadata +16 -2
@@ -14,8 +14,11 @@ require 'oci/database/models/create_backup_details'
14
14
  require 'oci/database/models/create_data_guard_association_details'
15
15
  require 'oci/database/models/create_data_guard_association_to_existing_db_system_details'
16
16
  require 'oci/database/models/create_database_details'
17
+ require 'oci/database/models/create_database_from_backup_details'
17
18
  require 'oci/database/models/create_db_home_details'
19
+ require 'oci/database/models/create_db_home_with_db_system_id_base'
18
20
  require 'oci/database/models/create_db_home_with_db_system_id_details'
21
+ require 'oci/database/models/create_db_home_with_db_system_id_from_backup_details'
19
22
  require 'oci/database/models/data_guard_association'
20
23
  require 'oci/database/models/data_guard_association_summary'
21
24
  require 'oci/database/models/database'
@@ -147,7 +147,7 @@ module OCI
147
147
 
148
148
  # Creates a new DB Home in the specified DB System based on the request parameters you provide.
149
149
  #
150
- # @param [CreateDbHomeWithDbSystemIdDetails] create_db_home_with_db_system_id_details Request to create a new DB Home.
150
+ # @param [CreateDbHomeWithDbSystemIdBase] create_db_home_with_db_system_id_details Request to create a new DB Home.
151
151
  # @param [Hash] opts the optional parameters
152
152
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
153
153
  # server error without risk of executing that same action again. Retry tokens expire after 24
@@ -168,10 +168,10 @@ module OCI
168
168
  # check to ensure the input is an array given that the the attribute
169
169
  # is documented as an array but the input is not
170
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) } )
171
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
172
172
  end
173
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]]))
174
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
175
175
  end # or else data not found in attributes(hash), not an issue as the data can be optional
176
176
  end
177
177
 
@@ -189,7 +189,7 @@ module OCI
189
189
  def to_hash
190
190
  hash = {}
191
191
  self.class.attribute_map.each_pair do |attr, param|
192
- value = send(attr)
192
+ value = public_send(attr)
193
193
  next if value.nil? && !instance_variable_defined?("@#{attr}")
194
194
  hash[param] = _to_hash(value)
195
195
  end
@@ -168,10 +168,10 @@ module OCI
168
168
  # check to ensure the input is an array given that the the attribute
169
169
  # is documented as an array but the input is not
170
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) } )
171
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
172
172
  end
173
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]]))
174
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
175
175
  end # or else data not found in attributes(hash), not an issue as the data can be optional
176
176
  end
177
177
 
@@ -189,7 +189,7 @@ module OCI
189
189
  def to_hash
190
190
  hash = {}
191
191
  self.class.attribute_map.each_pair do |attr, param|
192
- value = send(attr)
192
+ value = public_send(attr)
193
193
  next if value.nil? && !instance_variable_defined?("@#{attr}")
194
194
  hash[param] = _to_hash(value)
195
195
  end
@@ -62,10 +62,10 @@ module OCI
62
62
  # check to ensure the input is an array given that the the attribute
63
63
  # is documented as an array but the input is not
64
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) } )
65
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
66
66
  end
67
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]]))
68
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
69
69
  end # or else data not found in attributes(hash), not an issue as the data can be optional
70
70
  end
71
71
 
@@ -83,7 +83,7 @@ module OCI
83
83
  def to_hash
84
84
  hash = {}
85
85
  self.class.attribute_map.each_pair do |attr, param|
86
- value = send(attr)
86
+ value = public_send(attr)
87
87
  next if value.nil? && !instance_variable_defined?("@#{attr}")
88
88
  hash[param] = _to_hash(value)
89
89
  end
@@ -152,10 +152,10 @@ module OCI
152
152
  # check to ensure the input is an array given that the the attribute
153
153
  # is documented as an array but the input is not
154
154
  if attributes[self.class.attribute_map[key]].is_a?(Array)
155
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
155
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
156
156
  end
157
157
  elsif !attributes[self.class.attribute_map[key]].nil?
158
- self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
158
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
159
159
  end # or else data not found in attributes(hash), not an issue as the data can be optional
160
160
  end
161
161
 
@@ -173,7 +173,7 @@ module OCI
173
173
  def to_hash
174
174
  hash = {}
175
175
  self.class.attribute_map.each_pair do |attr, param|
176
- value = send(attr)
176
+ value = public_send(attr)
177
177
  next if value.nil? && !instance_variable_defined?("@#{attr}")
178
178
  hash[param] = _to_hash(value)
179
179
  end
@@ -63,10 +63,10 @@ module OCI
63
63
  # check to ensure the input is an array given that the the attribute
64
64
  # is documented as an array but the input is not
65
65
  if attributes[self.class.attribute_map[key]].is_a?(Array)
66
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
66
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
67
67
  end
68
68
  elsif !attributes[self.class.attribute_map[key]].nil?
69
- self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
69
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
70
70
  end # or else data not found in attributes(hash), not an issue as the data can be optional
71
71
  end
72
72
 
@@ -84,7 +84,7 @@ module OCI
84
84
  def to_hash
85
85
  hash = {}
86
86
  self.class.attribute_map.each_pair do |attr, param|
87
- value = send(attr)
87
+ value = public_send(attr)
88
88
  next if value.nil? && !instance_variable_defined?("@#{attr}")
89
89
  hash[param] = _to_hash(value)
90
90
  end
@@ -125,10 +125,10 @@ module OCI
125
125
  # check to ensure the input is an array given that the the attribute
126
126
  # is documented as an array but the input is not
127
127
  if attributes[self.class.attribute_map[key]].is_a?(Array)
128
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
128
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
129
129
  end
130
130
  elsif !attributes[self.class.attribute_map[key]].nil?
131
- self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
131
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
132
132
  end # or else data not found in attributes(hash), not an issue as the data can be optional
133
133
  end
134
134
 
@@ -146,7 +146,7 @@ module OCI
146
146
  def to_hash
147
147
  hash = {}
148
148
  self.class.attribute_map.each_pair do |attr, param|
149
- value = send(attr)
149
+ value = public_send(attr)
150
150
  next if value.nil? && !instance_variable_defined?("@#{attr}")
151
151
  hash[param] = _to_hash(value)
152
152
  end
@@ -0,0 +1,142 @@
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::CreateDatabaseFromBackupDetails
7
+ # A strong password for SYS, SYSTEM, PDB Admin and TDE Wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numbers, and two special characters. The special characters must be _, \\#, or -.
8
+ # @return [String]
9
+ attr_accessor :admin_password
10
+
11
+ # The backup OCID.
12
+ # @return [String]
13
+ attr_accessor :backup_id
14
+
15
+ # The password to open the TDE wallet.
16
+ # @return [String]
17
+ attr_accessor :backup_tde_password
18
+
19
+
20
+ # Initializes the object
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ def initialize(attributes = {})
23
+ return unless attributes.is_a?(Hash)
24
+
25
+ # convert string to symbol for hash key
26
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
27
+
28
+ if attributes[:'adminPassword']
29
+ self.admin_password = attributes[:'adminPassword']
30
+ end
31
+
32
+ if attributes[:'backupId']
33
+ self.backup_id = attributes[:'backupId']
34
+ end
35
+
36
+ if attributes[:'backupTDEPassword']
37
+ self.backup_tde_password = attributes[:'backupTDEPassword']
38
+ end
39
+
40
+ end
41
+
42
+ # Checks equality by comparing each attribute.
43
+ # @param [Object] other_object to be compared
44
+ def ==(other_object)
45
+ return true if self.equal?(other_object)
46
+ self.class == other_object.class &&
47
+ admin_password == other_object.admin_password &&
48
+ backup_id == other_object.backup_id &&
49
+ backup_tde_password == other_object.backup_tde_password
50
+ end
51
+
52
+ # @see the `==` method
53
+ # @param [Object] other_object to be compared
54
+ def eql?(other_object)
55
+ self == other_object
56
+ end
57
+
58
+ # Calculates hash code according to all attributes.
59
+ # @return [Fixnum] Hash code
60
+ def hash
61
+ [admin_password, backup_id, backup_tde_password].hash
62
+ end
63
+
64
+ # Builds the object from hash
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ # @return [Object] Returns the model itself
67
+ def build_from_hash(attributes)
68
+ return nil unless attributes.is_a?(Hash)
69
+ self.class.swagger_types.each_pair do |key, type|
70
+ if type =~ /^Array<(.*)>/i
71
+ # check to ensure the input is an array given that the the attribute
72
+ # is documented as an array but the input is not
73
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
74
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
75
+ end
76
+ elsif !attributes[self.class.attribute_map[key]].nil?
77
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
78
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
79
+ end
80
+
81
+ self
82
+ end
83
+
84
+ # Returns the string representation of the object
85
+ # @return [String] String presentation of the object
86
+ def to_s
87
+ to_hash.to_s
88
+ end
89
+
90
+ # Returns the object in the form of hash
91
+ # @return [Hash] Returns the object in the form of hash
92
+ def to_hash
93
+ hash = {}
94
+ self.class.attribute_map.each_pair do |attr, param|
95
+ value = public_send(attr)
96
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
97
+ hash[param] = _to_hash(value)
98
+ end
99
+ hash
100
+ end
101
+
102
+ private
103
+
104
+ # Outputs non-array value in the form of hash
105
+ # For object, use to_hash. Otherwise, just return the value
106
+ # @param [Object] value Any valid value
107
+ # @return [Hash] Returns the value in the form of hash
108
+ def _to_hash(value)
109
+ if value.is_a?(Array)
110
+ value.compact.map{ |v| _to_hash(v) }
111
+ elsif value.is_a?(Hash)
112
+ {}.tap do |hash|
113
+ value.each { |k, v| hash[k] = _to_hash(v) }
114
+ end
115
+ elsif value.respond_to? :to_hash
116
+ value.to_hash
117
+ else
118
+ value
119
+ end
120
+ end
121
+
122
+
123
+
124
+ # Attribute mapping from ruby-style variable name to JSON key.
125
+ def self.attribute_map
126
+ {
127
+ :'admin_password' => :'adminPassword',
128
+ :'backup_id' => :'backupId',
129
+ :'backup_tde_password' => :'backupTDEPassword'
130
+ }
131
+ end
132
+
133
+ # Attribute type mapping.
134
+ def self.swagger_types
135
+ {
136
+ :'admin_password' => :'String',
137
+ :'backup_id' => :'String',
138
+ :'backup_tde_password' => :'String'
139
+ }
140
+ end
141
+ end
142
+ end
@@ -70,10 +70,10 @@ module OCI
70
70
  # check to ensure the input is an array given that the the attribute
71
71
  # is documented as an array but the input is not
72
72
  if attributes[self.class.attribute_map[key]].is_a?(Array)
73
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
73
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
74
74
  end
75
75
  elsif !attributes[self.class.attribute_map[key]].nil?
76
- self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
76
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
77
77
  end # or else data not found in attributes(hash), not an issue as the data can be optional
78
78
  end
79
79
 
@@ -91,7 +91,7 @@ module OCI
91
91
  def to_hash
92
92
  hash = {}
93
93
  self.class.attribute_map.each_pair do |attr, param|
94
- value = send(attr)
94
+ value = public_send(attr)
95
95
  next if value.nil? && !instance_variable_defined?("@#{attr}")
96
96
  hash[param] = _to_hash(value)
97
97
  end
@@ -0,0 +1,173 @@
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::CreateDbHomeWithDbSystemIdBase
7
+
8
+ SOURCE_ENUM = [SOURCE_NONE = 'NONE',
9
+ SOURCE_DB_BACKUP = 'DB_BACKUP']
10
+
11
+ # The OCID of the DB System.
12
+ # @return [String]
13
+ attr_accessor :db_system_id
14
+
15
+ # The user-provided name of the database home.
16
+ # @return [String]
17
+ attr_accessor :display_name
18
+
19
+ # Source of database:
20
+ # NONE for creating a new database
21
+ # DB_BACKUP for creating a new database by restoring a backup
22
+ #
23
+ # @return [String]
24
+ attr_accessor :source
25
+
26
+
27
+ # Given the hash representation of a subtype of this class,
28
+ # use the info in the hash to return the class of the subtype.
29
+ def self.get_subtype(object_hash)
30
+ type = object_hash[:'source']
31
+
32
+ return 'OCI::Database::Models::CreateDbHomeWithDbSystemIdFromBackupDetails' if type == 'DB_BACKUP'
33
+ return 'OCI::Database::Models::CreateDbHomeWithDbSystemIdDetails' if type == 'NONE'
34
+
35
+ # TODO: Log a warning when the subtype is not found.
36
+ return 'OCI::Database::Models::CreateDbHomeWithDbSystemIdBase'
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+
47
+ if attributes[:'dbSystemId']
48
+ self.db_system_id = attributes[:'dbSystemId']
49
+ end
50
+
51
+ if attributes[:'displayName']
52
+ self.display_name = attributes[:'displayName']
53
+ end
54
+
55
+ if attributes[:'source']
56
+ self.source = attributes[:'source']
57
+ else
58
+ self.source = "NONE"
59
+ end
60
+
61
+ end
62
+
63
+ # Custom attribute writer method checking allowed values (enum).
64
+ # @param [Object] source Object to be assigned
65
+ def source=(source)
66
+ if source && !SOURCE_ENUM.include?(source)
67
+ fail "Invalid value for 'source': this must be one of the values in SOURCE_ENUM."
68
+ else
69
+ @source = source
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param [Object] other_object to be compared
75
+ def ==(other_object)
76
+ return true if self.equal?(other_object)
77
+ self.class == other_object.class &&
78
+ db_system_id == other_object.db_system_id &&
79
+ display_name == other_object.display_name &&
80
+ source == other_object.source
81
+ end
82
+
83
+ # @see the `==` method
84
+ # @param [Object] other_object to be compared
85
+ def eql?(other_object)
86
+ self == other_object
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Fixnum] Hash code
91
+ def hash
92
+ [db_system_id, display_name, source].hash
93
+ end
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def build_from_hash(attributes)
99
+ return nil unless attributes.is_a?(Hash)
100
+ self.class.swagger_types.each_pair do |key, type|
101
+ if type =~ /^Array<(.*)>/i
102
+ # check to ensure the input is an array given that the the attribute
103
+ # is documented as an array but the input is not
104
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
105
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
106
+ end
107
+ elsif !attributes[self.class.attribute_map[key]].nil?
108
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
109
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
110
+ end
111
+
112
+ self
113
+ end
114
+
115
+ # Returns the string representation of the object
116
+ # @return [String] String presentation of the object
117
+ def to_s
118
+ to_hash.to_s
119
+ end
120
+
121
+ # Returns the object in the form of hash
122
+ # @return [Hash] Returns the object in the form of hash
123
+ def to_hash
124
+ hash = {}
125
+ self.class.attribute_map.each_pair do |attr, param|
126
+ value = public_send(attr)
127
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
128
+ hash[param] = _to_hash(value)
129
+ end
130
+ hash
131
+ end
132
+
133
+ private
134
+
135
+ # Outputs non-array value in the form of hash
136
+ # For object, use to_hash. Otherwise, just return the value
137
+ # @param [Object] value Any valid value
138
+ # @return [Hash] Returns the value in the form of hash
139
+ def _to_hash(value)
140
+ if value.is_a?(Array)
141
+ value.compact.map{ |v| _to_hash(v) }
142
+ elsif value.is_a?(Hash)
143
+ {}.tap do |hash|
144
+ value.each { |k, v| hash[k] = _to_hash(v) }
145
+ end
146
+ elsif value.respond_to? :to_hash
147
+ value.to_hash
148
+ else
149
+ value
150
+ end
151
+ end
152
+
153
+
154
+
155
+ # Attribute mapping from ruby-style variable name to JSON key.
156
+ def self.attribute_map
157
+ {
158
+ :'db_system_id' => :'dbSystemId',
159
+ :'display_name' => :'displayName',
160
+ :'source' => :'source'
161
+ }
162
+ end
163
+
164
+ # Attribute type mapping.
165
+ def self.swagger_types
166
+ {
167
+ :'db_system_id' => :'String',
168
+ :'display_name' => :'String',
169
+ :'source' => :'String'
170
+ }
171
+ end
172
+ end
173
+ end