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.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/oci.rb +2 -1
- data/lib/oci/audit/audit.rb +19 -0
- data/lib/oci/audit/audit_client.rb +176 -0
- data/lib/oci/audit/models/audit_event.rb +307 -0
- data/lib/oci/audit/models/configuration.rb +120 -0
- data/lib/oci/audit/models/update_configuration_details.rb +120 -0
- data/lib/oci/audit/util.rb +1 -0
- data/lib/oci/core/blockstorage_client.rb +69 -1
- data/lib/oci/core/compute_client.rb +106 -16
- data/lib/oci/core/core.rb +3 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +2 -2
- data/lib/oci/core/models/attach_vnic_details.rb +2 -2
- data/lib/oci/core/models/attach_volume_details.rb +2 -2
- data/lib/oci/core/models/capture_console_history_details.rb +2 -2
- data/lib/oci/core/models/console_history.rb +2 -2
- data/lib/oci/core/models/cpe.rb +2 -2
- data/lib/oci/core/models/create_cpe_details.rb +2 -2
- data/lib/oci/core/models/create_cross_connect_details.rb +2 -2
- data/lib/oci/core/models/create_cross_connect_group_details.rb +2 -2
- data/lib/oci/core/models/create_dhcp_details.rb +2 -2
- data/lib/oci/core/models/create_drg_attachment_details.rb +2 -2
- data/lib/oci/core/models/create_drg_details.rb +2 -2
- data/lib/oci/core/models/create_image_details.rb +2 -2
- data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
- data/lib/oci/core/models/create_internet_gateway_details.rb +2 -2
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +2 -2
- data/lib/oci/core/models/create_private_ip_details.rb +2 -2
- data/lib/oci/core/models/create_route_table_details.rb +2 -2
- data/lib/oci/core/models/create_security_list_details.rb +2 -2
- data/lib/oci/core/models/create_subnet_details.rb +2 -2
- data/lib/oci/core/models/create_vcn_details.rb +2 -2
- data/lib/oci/core/models/create_virtual_circuit_details.rb +5 -6
- data/lib/oci/core/models/create_vnic_details.rb +2 -2
- data/lib/oci/core/models/create_volume_backup_details.rb +2 -2
- data/lib/oci/core/models/create_volume_details.rb +20 -4
- data/lib/oci/core/models/cross_connect.rb +2 -2
- data/lib/oci/core/models/cross_connect_group.rb +2 -2
- data/lib/oci/core/models/cross_connect_location.rb +2 -2
- data/lib/oci/core/models/cross_connect_mapping.rb +2 -2
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +2 -2
- data/lib/oci/core/models/cross_connect_status.rb +2 -2
- data/lib/oci/core/models/dhcp_dns_option.rb +2 -2
- data/lib/oci/core/models/dhcp_option.rb +2 -2
- data/lib/oci/core/models/dhcp_options.rb +2 -2
- data/lib/oci/core/models/dhcp_search_domain_option.rb +2 -2
- data/lib/oci/core/models/drg.rb +2 -2
- data/lib/oci/core/models/drg_attachment.rb +2 -2
- data/lib/oci/core/models/egress_security_rule.rb +2 -2
- data/lib/oci/core/models/export_image_details.rb +3 -3
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +5 -5
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +3 -3
- data/lib/oci/core/models/fast_connect_provider_service.rb +2 -2
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +2 -2
- data/lib/oci/core/models/icmp_options.rb +2 -2
- data/lib/oci/core/models/image.rb +2 -2
- data/lib/oci/core/models/image_source_details.rb +3 -3
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +5 -5
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +3 -3
- data/lib/oci/core/models/ingress_security_rule.rb +2 -2
- data/lib/oci/core/models/instance.rb +4 -4
- data/lib/oci/core/models/instance_console_connection.rb +2 -2
- data/lib/oci/core/models/instance_credentials.rb +2 -2
- data/lib/oci/core/models/internet_gateway.rb +2 -2
- data/lib/oci/core/models/ip_sec_connection.rb +2 -2
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +2 -2
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +2 -2
- data/lib/oci/core/models/launch_instance_details.rb +4 -4
- data/lib/oci/core/models/letter_of_authority.rb +2 -2
- data/lib/oci/core/models/port_range.rb +2 -2
- data/lib/oci/core/models/private_ip.rb +2 -2
- data/lib/oci/core/models/route_rule.rb +2 -2
- data/lib/oci/core/models/route_table.rb +2 -2
- data/lib/oci/core/models/security_list.rb +2 -2
- data/lib/oci/core/models/shape.rb +2 -2
- data/lib/oci/core/models/subnet.rb +2 -2
- data/lib/oci/core/models/tcp_options.rb +2 -2
- data/lib/oci/core/models/tunnel_config.rb +2 -2
- data/lib/oci/core/models/tunnel_status.rb +2 -2
- data/lib/oci/core/models/udp_options.rb +2 -2
- data/lib/oci/core/models/update_console_history_details.rb +2 -2
- data/lib/oci/core/models/update_cpe_details.rb +2 -2
- data/lib/oci/core/models/update_cross_connect_details.rb +2 -2
- data/lib/oci/core/models/update_cross_connect_group_details.rb +2 -2
- data/lib/oci/core/models/update_dhcp_details.rb +2 -2
- data/lib/oci/core/models/update_drg_attachment_details.rb +2 -2
- data/lib/oci/core/models/update_drg_details.rb +2 -2
- data/lib/oci/core/models/update_image_details.rb +2 -2
- data/lib/oci/core/models/update_instance_details.rb +2 -2
- data/lib/oci/core/models/update_internet_gateway_details.rb +2 -2
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +2 -2
- data/lib/oci/core/models/update_private_ip_details.rb +2 -2
- data/lib/oci/core/models/update_route_table_details.rb +2 -2
- data/lib/oci/core/models/update_security_list_details.rb +2 -2
- data/lib/oci/core/models/update_subnet_details.rb +2 -2
- data/lib/oci/core/models/update_vcn_details.rb +2 -2
- data/lib/oci/core/models/update_virtual_circuit_details.rb +2 -3
- data/lib/oci/core/models/update_vnic_details.rb +2 -2
- data/lib/oci/core/models/update_volume_backup_details.rb +2 -2
- data/lib/oci/core/models/update_volume_details.rb +2 -2
- data/lib/oci/core/models/vcn.rb +2 -2
- data/lib/oci/core/models/virtual_circuit.rb +5 -5
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +2 -2
- data/lib/oci/core/models/vnic.rb +2 -2
- data/lib/oci/core/models/vnic_attachment.rb +2 -2
- data/lib/oci/core/models/volume.rb +29 -5
- data/lib/oci/core/models/volume_attachment.rb +2 -2
- data/lib/oci/core/models/volume_backup.rb +2 -2
- data/lib/oci/core/models/volume_source_details.rb +131 -0
- data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +128 -0
- data/lib/oci/core/models/volume_source_from_volume_details.rb +128 -0
- data/lib/oci/core/virtual_network_client.rb +312 -10
- data/lib/oci/database/database.rb +7 -0
- data/lib/oci/database/database_client.rb +228 -4
- data/lib/oci/database/models/backup.rb +253 -0
- data/lib/oci/database/models/backup_summary.rb +253 -0
- data/lib/oci/database/models/create_backup_details.rb +131 -0
- data/lib/oci/database/models/create_data_guard_association_details.rb +2 -2
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +2 -2
- data/lib/oci/database/models/create_database_details.rb +13 -3
- data/lib/oci/database/models/create_db_home_details.rb +2 -2
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +2 -2
- data/lib/oci/database/models/data_guard_association.rb +2 -2
- data/lib/oci/database/models/data_guard_association_summary.rb +374 -0
- data/lib/oci/database/models/database.rb +15 -3
- data/lib/oci/database/models/database_summary.rb +15 -3
- data/lib/oci/database/models/db_backup_config.rb +120 -0
- data/lib/oci/database/models/db_home.rb +2 -2
- data/lib/oci/database/models/db_home_summary.rb +2 -2
- data/lib/oci/database/models/db_node.rb +2 -2
- data/lib/oci/database/models/db_node_summary.rb +2 -2
- data/lib/oci/database/models/db_system.rb +9 -9
- data/lib/oci/database/models/db_system_shape_summary.rb +2 -2
- data/lib/oci/database/models/db_system_summary.rb +9 -9
- data/lib/oci/database/models/db_version_summary.rb +2 -2
- data/lib/oci/database/models/failover_data_guard_association_details.rb +2 -2
- data/lib/oci/database/models/launch_db_system_details.rb +2 -2
- data/lib/oci/database/models/patch.rb +4 -2
- data/lib/oci/database/models/patch_details.rb +4 -3
- data/lib/oci/database/models/patch_history_entry.rb +3 -2
- data/lib/oci/database/models/patch_history_entry_summary.rb +3 -2
- data/lib/oci/database/models/patch_summary.rb +4 -2
- data/lib/oci/database/models/reinstate_data_guard_association_details.rb +2 -2
- data/lib/oci/database/models/restore_database_details.rb +145 -0
- data/lib/oci/database/models/switchover_data_guard_association_details.rb +2 -2
- data/lib/oci/database/models/update_database_details.rb +119 -0
- data/lib/oci/database/models/update_db_home_details.rb +2 -2
- data/lib/oci/database/models/update_db_system_details.rb +9 -9
- data/lib/oci/identity/identity_client.rb +6 -5
- data/lib/oci/identity/models/add_user_to_group_details.rb +2 -2
- data/lib/oci/identity/models/api_key.rb +2 -2
- data/lib/oci/identity/models/availability_domain.rb +2 -2
- data/lib/oci/identity/models/compartment.rb +3 -3
- data/lib/oci/identity/models/create_api_key_details.rb +2 -2
- data/lib/oci/identity/models/create_compartment_details.rb +2 -2
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +2 -2
- data/lib/oci/identity/models/create_group_details.rb +2 -2
- data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +2 -2
- data/lib/oci/identity/models/create_policy_details.rb +2 -2
- data/lib/oci/identity/models/create_region_subscription_details.rb +2 -2
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +2 -2
- data/lib/oci/identity/models/create_swift_password_details.rb +2 -2
- data/lib/oci/identity/models/create_user_details.rb +2 -2
- data/lib/oci/identity/models/customer_secret_key.rb +2 -2
- data/lib/oci/identity/models/customer_secret_key_summary.rb +2 -2
- data/lib/oci/identity/models/group.rb +2 -2
- data/lib/oci/identity/models/identity_provider.rb +4 -4
- data/lib/oci/identity/models/idp_group_mapping.rb +2 -2
- data/lib/oci/identity/models/policy.rb +2 -2
- data/lib/oci/identity/models/region.rb +4 -4
- data/lib/oci/identity/models/region_subscription.rb +4 -4
- data/lib/oci/identity/models/saml2_identity_provider.rb +2 -2
- data/lib/oci/identity/models/swift_password.rb +2 -2
- data/lib/oci/identity/models/tenancy.rb +2 -2
- data/lib/oci/identity/models/ui_password.rb +2 -2
- data/lib/oci/identity/models/update_compartment_details.rb +2 -2
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +2 -2
- data/lib/oci/identity/models/update_group_details.rb +2 -2
- data/lib/oci/identity/models/update_identity_provider_details.rb +2 -2
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +2 -2
- data/lib/oci/identity/models/update_policy_details.rb +2 -2
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +2 -2
- data/lib/oci/identity/models/update_state_details.rb +2 -2
- data/lib/oci/identity/models/update_swift_password_details.rb +2 -2
- data/lib/oci/identity/models/update_user_details.rb +2 -2
- data/lib/oci/identity/models/user.rb +2 -2
- data/lib/oci/identity/models/user_group_membership.rb +2 -2
- data/lib/oci/load_balancer/load_balancer_client.rb +1 -1
- data/lib/oci/load_balancer/models/backend.rb +2 -2
- data/lib/oci/load_balancer/models/backend_details.rb +2 -2
- data/lib/oci/load_balancer/models/backend_health.rb +2 -2
- data/lib/oci/load_balancer/models/backend_set.rb +2 -2
- data/lib/oci/load_balancer/models/backend_set_details.rb +2 -2
- data/lib/oci/load_balancer/models/backend_set_health.rb +2 -2
- data/lib/oci/load_balancer/models/certificate.rb +2 -2
- data/lib/oci/load_balancer/models/certificate_details.rb +2 -2
- data/lib/oci/load_balancer/models/create_backend_details.rb +2 -2
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +2 -2
- data/lib/oci/load_balancer/models/create_certificate_details.rb +2 -2
- data/lib/oci/load_balancer/models/create_listener_details.rb +2 -2
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +2 -2
- data/lib/oci/load_balancer/models/health_check_result.rb +2 -2
- data/lib/oci/load_balancer/models/health_checker.rb +2 -2
- data/lib/oci/load_balancer/models/health_checker_details.rb +2 -2
- data/lib/oci/load_balancer/models/ip_address.rb +2 -2
- data/lib/oci/load_balancer/models/listener.rb +2 -2
- data/lib/oci/load_balancer/models/listener_details.rb +2 -2
- data/lib/oci/load_balancer/models/load_balancer.rb +2 -2
- data/lib/oci/load_balancer/models/load_balancer_health.rb +2 -2
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +2 -2
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +2 -2
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +2 -2
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +2 -2
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +2 -2
- data/lib/oci/load_balancer/models/ssl_configuration.rb +2 -2
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +2 -2
- data/lib/oci/load_balancer/models/update_backend_details.rb +2 -2
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -2
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +2 -2
- data/lib/oci/load_balancer/models/update_listener_details.rb +2 -2
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +2 -2
- data/lib/oci/load_balancer/models/work_request.rb +2 -2
- data/lib/oci/load_balancer/models/work_request_error.rb +2 -2
- data/lib/oci/object_storage/models/bucket.rb +44 -12
- data/lib/oci/object_storage/models/bucket_summary.rb +6 -4
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +2 -2
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +2 -2
- data/lib/oci/object_storage/models/create_bucket_details.rb +41 -11
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +9 -7
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +6 -7
- data/lib/oci/object_storage/models/list_objects.rb +4 -3
- data/lib/oci/object_storage/models/multipart_upload.rb +3 -3
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +6 -6
- data/lib/oci/object_storage/models/namespace_metadata.rb +142 -0
- data/lib/oci/object_storage/models/object_summary.rb +6 -4
- data/lib/oci/object_storage/models/preauthenticated_request.rb +13 -11
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +8 -10
- data/lib/oci/object_storage/models/rename_object_details.rb +164 -0
- data/lib/oci/object_storage/models/restore_objects_details.rb +120 -0
- data/lib/oci/object_storage/models/update_bucket_details.rb +20 -8
- data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +131 -0
- data/lib/oci/object_storage/object_storage.rb +4 -0
- data/lib/oci/object_storage/object_storage_client.rb +206 -94
- data/lib/oci/regions.rb +2 -1
- data/lib/oci/version.rb +1 -1
- metadata +22 -2
|
@@ -8,14 +8,19 @@ module OCI
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
# Require models
|
|
11
|
+
require 'oci/database/models/backup'
|
|
12
|
+
require 'oci/database/models/backup_summary'
|
|
13
|
+
require 'oci/database/models/create_backup_details'
|
|
11
14
|
require 'oci/database/models/create_data_guard_association_details'
|
|
12
15
|
require 'oci/database/models/create_data_guard_association_to_existing_db_system_details'
|
|
13
16
|
require 'oci/database/models/create_database_details'
|
|
14
17
|
require 'oci/database/models/create_db_home_details'
|
|
15
18
|
require 'oci/database/models/create_db_home_with_db_system_id_details'
|
|
16
19
|
require 'oci/database/models/data_guard_association'
|
|
20
|
+
require 'oci/database/models/data_guard_association_summary'
|
|
17
21
|
require 'oci/database/models/database'
|
|
18
22
|
require 'oci/database/models/database_summary'
|
|
23
|
+
require 'oci/database/models/db_backup_config'
|
|
19
24
|
require 'oci/database/models/db_home'
|
|
20
25
|
require 'oci/database/models/db_home_summary'
|
|
21
26
|
require 'oci/database/models/db_node'
|
|
@@ -32,7 +37,9 @@ require 'oci/database/models/patch_history_entry'
|
|
|
32
37
|
require 'oci/database/models/patch_history_entry_summary'
|
|
33
38
|
require 'oci/database/models/patch_summary'
|
|
34
39
|
require 'oci/database/models/reinstate_data_guard_association_details'
|
|
40
|
+
require 'oci/database/models/restore_database_details'
|
|
35
41
|
require 'oci/database/models/switchover_data_guard_association_details'
|
|
42
|
+
require 'oci/database/models/update_database_details'
|
|
36
43
|
require 'oci/database/models/update_db_home_details'
|
|
37
44
|
require 'oci/database/models/update_db_system_details'
|
|
38
45
|
|
|
@@ -33,7 +33,7 @@ module OCI
|
|
|
33
33
|
config ||= OCI.config
|
|
34
34
|
config.validate
|
|
35
35
|
|
|
36
|
-
signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content, signing_strategy: Signer::
|
|
36
|
+
signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content, signing_strategy: Signer::STANDARD)
|
|
37
37
|
@api_client = ApiClient.new(config, signer)
|
|
38
38
|
|
|
39
39
|
region ||= config.region
|
|
@@ -58,10 +58,49 @@ module OCI
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
|
|
61
|
+
# Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.
|
|
62
|
+
#
|
|
63
|
+
# @param [CreateBackupDetails] create_backup_details Request to create a new database backup.
|
|
64
|
+
# @param [Hash] opts the optional parameters
|
|
65
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
|
66
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
|
67
|
+
# hours, but can be invalidated before then due to conflicting operations (for example, if a resource
|
|
68
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
|
69
|
+
# may be rejected).
|
|
70
|
+
#
|
|
71
|
+
# @return [Response] A Response object with data of type OCI::Database::Models::Backup
|
|
72
|
+
def create_backup(create_backup_details, opts = {})
|
|
73
|
+
logger.debug "Calling operation DatabaseClient#create_backup." if logger
|
|
74
|
+
|
|
75
|
+
fail "Missing the required parameter 'create_backup_details' when calling create_backup." if create_backup_details.nil?
|
|
76
|
+
|
|
77
|
+
path = "/backups"
|
|
78
|
+
|
|
79
|
+
# Query Params
|
|
80
|
+
query_params = {}
|
|
81
|
+
|
|
82
|
+
# Header Params
|
|
83
|
+
header_params = {}
|
|
84
|
+
header_params['accept'] = 'application/json'
|
|
85
|
+
header_params['content-type'] = 'application/json'
|
|
86
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
|
87
|
+
|
|
88
|
+
post_body = @api_client.object_to_http_body(create_backup_details)
|
|
89
|
+
|
|
90
|
+
return @api_client.call_api(
|
|
91
|
+
:POST,
|
|
92
|
+
path,
|
|
93
|
+
endpoint,
|
|
94
|
+
:header_params => header_params,
|
|
95
|
+
:query_params => query_params,
|
|
96
|
+
:body => post_body,
|
|
97
|
+
:return_type => 'OCI::Database::Models::Backup')
|
|
98
|
+
end
|
|
99
|
+
|
|
61
100
|
# Creates a new Data Guard association. A Data Guard association represents the replication relationship between the
|
|
62
101
|
# specified database and a peer database. For more information, see [Using Oracle Data Guard](https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/usingdataguard.htm).
|
|
63
102
|
#
|
|
64
|
-
# All Oracle
|
|
103
|
+
# All Oracle Cloud Infrastructure resources, including Data Guard associations, get an Oracle-assigned, unique ID
|
|
65
104
|
# called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response.
|
|
66
105
|
# You can also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the
|
|
67
106
|
# resource in the Console. Fore more information, see
|
|
@@ -163,6 +202,7 @@ module OCI
|
|
|
163
202
|
#
|
|
164
203
|
# @param [String] db_node_id The database node [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
|
165
204
|
# @param [String] action The action to perform on the DB Node.
|
|
205
|
+
# Allowed values are: STOP, START, SOFTRESET, RESET
|
|
166
206
|
# @param [Hash] opts the optional parameters
|
|
167
207
|
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
|
168
208
|
# server error without risk of executing that same action again. Retry tokens expire after 24
|
|
@@ -209,6 +249,41 @@ module OCI
|
|
|
209
249
|
:return_type => 'OCI::Database::Models::DbNode')
|
|
210
250
|
end
|
|
211
251
|
|
|
252
|
+
# Deletes a full backup. You cannot delete automatic backups using this API.
|
|
253
|
+
# @param [String] backup_id The backup OCID.
|
|
254
|
+
# @param [Hash] opts the optional parameters
|
|
255
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
|
256
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
|
257
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
|
258
|
+
#
|
|
259
|
+
# @return [Response] A Response object with data of type nil
|
|
260
|
+
def delete_backup(backup_id, opts = {})
|
|
261
|
+
logger.debug "Calling operation DatabaseClient#delete_backup." if logger
|
|
262
|
+
|
|
263
|
+
fail "Missing the required parameter 'backup_id' when calling delete_backup." if backup_id.nil?
|
|
264
|
+
|
|
265
|
+
path = "/backups/{backupId}".sub('{backupId}', backup_id.to_s)
|
|
266
|
+
|
|
267
|
+
# Query Params
|
|
268
|
+
query_params = {}
|
|
269
|
+
|
|
270
|
+
# Header Params
|
|
271
|
+
header_params = {}
|
|
272
|
+
header_params['accept'] = 'application/json'
|
|
273
|
+
header_params['content-type'] = 'application/json'
|
|
274
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
|
275
|
+
|
|
276
|
+
post_body = nil
|
|
277
|
+
|
|
278
|
+
return @api_client.call_api(
|
|
279
|
+
:DELETE,
|
|
280
|
+
path,
|
|
281
|
+
endpoint,
|
|
282
|
+
:header_params => header_params,
|
|
283
|
+
:query_params => query_params,
|
|
284
|
+
:body => post_body)
|
|
285
|
+
end
|
|
286
|
+
|
|
212
287
|
# Deletes a DB Home. The DB Home and its database data are local to the DB System and will be lost when it is deleted. Oracle recommends that you back up any data in the DB System prior to deleting it.
|
|
213
288
|
#
|
|
214
289
|
# @param [String] db_home_id The database home [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
|
@@ -217,6 +292,7 @@ module OCI
|
|
|
217
292
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
|
218
293
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
|
219
294
|
#
|
|
295
|
+
# @option opts [BOOLEAN] :perform_final_backup Whether to perform a final backup of the database or not. Default is false. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.
|
|
220
296
|
# @return [Response] A Response object with data of type nil
|
|
221
297
|
def delete_db_home(db_home_id, opts = {})
|
|
222
298
|
logger.debug "Calling operation DatabaseClient#delete_db_home." if logger
|
|
@@ -227,6 +303,7 @@ module OCI
|
|
|
227
303
|
|
|
228
304
|
# Query Params
|
|
229
305
|
query_params = {}
|
|
306
|
+
query_params[:'performFinalBackup'] = opts[:'perform_final_backup'] if opts[:'perform_final_backup']
|
|
230
307
|
|
|
231
308
|
# Header Params
|
|
232
309
|
header_params = {}
|
|
@@ -290,6 +367,37 @@ module OCI
|
|
|
290
367
|
:return_type => 'OCI::Database::Models::DataGuardAssociation')
|
|
291
368
|
end
|
|
292
369
|
|
|
370
|
+
# Gets information about the specified backup.
|
|
371
|
+
# @param [String] backup_id The backup OCID.
|
|
372
|
+
# @param [Hash] opts the optional parameters
|
|
373
|
+
# @return [Response] A Response object with data of type OCI::Database::Models::Backup
|
|
374
|
+
def get_backup(backup_id, opts = {})
|
|
375
|
+
logger.debug "Calling operation DatabaseClient#get_backup." if logger
|
|
376
|
+
|
|
377
|
+
fail "Missing the required parameter 'backup_id' when calling get_backup." if backup_id.nil?
|
|
378
|
+
|
|
379
|
+
path = "/backups/{backupId}".sub('{backupId}', backup_id.to_s)
|
|
380
|
+
|
|
381
|
+
# Query Params
|
|
382
|
+
query_params = {}
|
|
383
|
+
|
|
384
|
+
# Header Params
|
|
385
|
+
header_params = {}
|
|
386
|
+
header_params['accept'] = 'application/json'
|
|
387
|
+
header_params['content-type'] = 'application/json'
|
|
388
|
+
|
|
389
|
+
post_body = nil
|
|
390
|
+
|
|
391
|
+
return @api_client.call_api(
|
|
392
|
+
:GET,
|
|
393
|
+
path,
|
|
394
|
+
endpoint,
|
|
395
|
+
:header_params => header_params,
|
|
396
|
+
:query_params => query_params,
|
|
397
|
+
:body => post_body,
|
|
398
|
+
:return_type => 'OCI::Database::Models::Backup')
|
|
399
|
+
end
|
|
400
|
+
|
|
293
401
|
# Gets the specified Data Guard association's configuration information.
|
|
294
402
|
#
|
|
295
403
|
# @param [String] database_id The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
|
@@ -632,13 +740,51 @@ module OCI
|
|
|
632
740
|
:return_type => 'OCI::Database::Models::DbSystem')
|
|
633
741
|
end
|
|
634
742
|
|
|
743
|
+
# Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided.
|
|
744
|
+
#
|
|
745
|
+
# @param [Hash] opts the optional parameters
|
|
746
|
+
# @option opts [String] :database_id The OCID of the database.
|
|
747
|
+
# @option opts [String] :compartment_id The compartment OCID.
|
|
748
|
+
# @option opts [Integer] :limit The maximum number of items to return.
|
|
749
|
+
# @option opts [String] :page The pagination token to continue listing from.
|
|
750
|
+
# @return [Response] A Response object with data of type Array<OCI::Database::Models::BackupSummary>
|
|
751
|
+
def list_backups(opts = {})
|
|
752
|
+
logger.debug "Calling operation DatabaseClient#list_backups." if logger
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
path = "/backups"
|
|
756
|
+
|
|
757
|
+
# Query Params
|
|
758
|
+
query_params = {}
|
|
759
|
+
query_params[:'databaseId'] = opts[:'database_id'] if opts[:'database_id']
|
|
760
|
+
query_params[:'compartmentId'] = opts[:'compartment_id'] if opts[:'compartment_id']
|
|
761
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
|
762
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
|
763
|
+
|
|
764
|
+
# Header Params
|
|
765
|
+
header_params = {}
|
|
766
|
+
header_params['accept'] = 'application/json'
|
|
767
|
+
header_params['content-type'] = 'application/json'
|
|
768
|
+
|
|
769
|
+
post_body = nil
|
|
770
|
+
|
|
771
|
+
return @api_client.call_api(
|
|
772
|
+
:GET,
|
|
773
|
+
path,
|
|
774
|
+
endpoint,
|
|
775
|
+
:header_params => header_params,
|
|
776
|
+
:query_params => query_params,
|
|
777
|
+
:body => post_body,
|
|
778
|
+
:return_type => 'Array<OCI::Database::Models::BackupSummary>')
|
|
779
|
+
end
|
|
780
|
+
|
|
635
781
|
# Lists all Data Guard associations for the specified database.
|
|
636
782
|
#
|
|
637
783
|
# @param [String] database_id The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
|
638
784
|
# @param [Hash] opts the optional parameters
|
|
639
785
|
# @option opts [Integer] :limit The maximum number of items to return.
|
|
640
786
|
# @option opts [String] :page The pagination token to continue listing from.
|
|
641
|
-
# @return [Response] A Response object with data of type Array<OCI::Database::Models::
|
|
787
|
+
# @return [Response] A Response object with data of type Array<OCI::Database::Models::DataGuardAssociationSummary>
|
|
642
788
|
def list_data_guard_associations(database_id, opts = {})
|
|
643
789
|
logger.debug "Calling operation DatabaseClient#list_data_guard_associations." if logger
|
|
644
790
|
|
|
@@ -665,7 +811,7 @@ module OCI
|
|
|
665
811
|
:header_params => header_params,
|
|
666
812
|
:query_params => query_params,
|
|
667
813
|
:body => post_body,
|
|
668
|
-
:return_type => 'Array<OCI::Database::Models::
|
|
814
|
+
:return_type => 'Array<OCI::Database::Models::DataGuardAssociationSummary>')
|
|
669
815
|
end
|
|
670
816
|
|
|
671
817
|
# Gets a list of the databases in the specified database home.
|
|
@@ -1088,6 +1234,45 @@ module OCI
|
|
|
1088
1234
|
:return_type => 'OCI::Database::Models::DataGuardAssociation')
|
|
1089
1235
|
end
|
|
1090
1236
|
|
|
1237
|
+
# Restore a Database based on the request parameters you provide.
|
|
1238
|
+
#
|
|
1239
|
+
# @param [String] database_id The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
|
1240
|
+
# @param [RestoreDatabaseDetails] restore_database_details Request to perform database restore.
|
|
1241
|
+
# @param [Hash] opts the optional parameters
|
|
1242
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
|
1243
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
|
1244
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
|
1245
|
+
#
|
|
1246
|
+
# @return [Response] A Response object with data of type OCI::Database::Models::Database
|
|
1247
|
+
def restore_database(database_id, restore_database_details, opts = {})
|
|
1248
|
+
logger.debug "Calling operation DatabaseClient#restore_database." if logger
|
|
1249
|
+
|
|
1250
|
+
fail "Missing the required parameter 'database_id' when calling restore_database." if database_id.nil?
|
|
1251
|
+
fail "Missing the required parameter 'restore_database_details' when calling restore_database." if restore_database_details.nil?
|
|
1252
|
+
|
|
1253
|
+
path = "/databases/{databaseId}/actions/restore".sub('{databaseId}', database_id.to_s)
|
|
1254
|
+
|
|
1255
|
+
# Query Params
|
|
1256
|
+
query_params = {}
|
|
1257
|
+
|
|
1258
|
+
# Header Params
|
|
1259
|
+
header_params = {}
|
|
1260
|
+
header_params['accept'] = 'application/json'
|
|
1261
|
+
header_params['content-type'] = 'application/json'
|
|
1262
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
|
1263
|
+
|
|
1264
|
+
post_body = @api_client.object_to_http_body(restore_database_details)
|
|
1265
|
+
|
|
1266
|
+
return @api_client.call_api(
|
|
1267
|
+
:POST,
|
|
1268
|
+
path,
|
|
1269
|
+
endpoint,
|
|
1270
|
+
:header_params => header_params,
|
|
1271
|
+
:query_params => query_params,
|
|
1272
|
+
:body => post_body,
|
|
1273
|
+
:return_type => 'OCI::Database::Models::Database')
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1091
1276
|
# Performs a switchover to transition the primary database of a Data Guard association into a standby role. The
|
|
1092
1277
|
# standby database associated with the `dataGuardAssociationId` assumes the primary database role.
|
|
1093
1278
|
#
|
|
@@ -1167,6 +1352,45 @@ module OCI
|
|
|
1167
1352
|
:body => post_body)
|
|
1168
1353
|
end
|
|
1169
1354
|
|
|
1355
|
+
# Update a Database based on the request parameters you provide.
|
|
1356
|
+
#
|
|
1357
|
+
# @param [String] database_id The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
|
1358
|
+
# @param [UpdateDatabaseDetails] update_database_details Request to perform database update.
|
|
1359
|
+
# @param [Hash] opts the optional parameters
|
|
1360
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
|
1361
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
|
1362
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
|
1363
|
+
#
|
|
1364
|
+
# @return [Response] A Response object with data of type OCI::Database::Models::Database
|
|
1365
|
+
def update_database(database_id, update_database_details, opts = {})
|
|
1366
|
+
logger.debug "Calling operation DatabaseClient#update_database." if logger
|
|
1367
|
+
|
|
1368
|
+
fail "Missing the required parameter 'database_id' when calling update_database." if database_id.nil?
|
|
1369
|
+
fail "Missing the required parameter 'update_database_details' when calling update_database." if update_database_details.nil?
|
|
1370
|
+
|
|
1371
|
+
path = "/databases/{databaseId}".sub('{databaseId}', database_id.to_s)
|
|
1372
|
+
|
|
1373
|
+
# Query Params
|
|
1374
|
+
query_params = {}
|
|
1375
|
+
|
|
1376
|
+
# Header Params
|
|
1377
|
+
header_params = {}
|
|
1378
|
+
header_params['accept'] = 'application/json'
|
|
1379
|
+
header_params['content-type'] = 'application/json'
|
|
1380
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
|
1381
|
+
|
|
1382
|
+
post_body = @api_client.object_to_http_body(update_database_details)
|
|
1383
|
+
|
|
1384
|
+
return @api_client.call_api(
|
|
1385
|
+
:PUT,
|
|
1386
|
+
path,
|
|
1387
|
+
endpoint,
|
|
1388
|
+
:header_params => header_params,
|
|
1389
|
+
:query_params => query_params,
|
|
1390
|
+
:body => post_body,
|
|
1391
|
+
:return_type => 'OCI::Database::Models::Database')
|
|
1392
|
+
end
|
|
1393
|
+
|
|
1170
1394
|
# Patches the specified dbHome.
|
|
1171
1395
|
# @param [String] db_home_id The database home [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
|
1172
1396
|
# @param [UpdateDbHomeDetails] update_db_home_details Request to update the properties of a DB Home.
|
|
@@ -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::Backup
|
|
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
|