403Webshell
Server IP : 162.144.4.212  /  Your IP : 216.73.216.108
Web Server : Apache
System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User : cozeellc ( 2980)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/oci/recovery/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/oci/recovery/__pycache__/database_recovery_client.cpython-39.pyc
a

���fz��@s�ddlmZddlmZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZmZmZdd	lmZdd
lmZddlmZed
�ZGdd�de�ZdS)�)�absolute_import)�requests)�six)�retry�circuit_breaker)�
BaseClient)�get_config_value_or_default�validate_config)�Signer)�Sentinel�#get_signer_from_authentication_type�AUTHENTICATION_TYPE_FIELD_NAME)�InvalidAlloyConfig)�OCI_SDK_ENABLED_SERVICES_SET�)�recovery_type_mappingZMissingc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8S)9�DatabaseRecoveryClientz\
    Use Oracle Database Autonomous Recovery Service API to manage Protected Databases.
    c
Ks&t�d�std��t||�d�d�d|vr6|d}nDt|vrHt|�}n2t|d|d|d|�d�t|d	�|�d
�d�}d|�d
�ddi|�dd�|�dt	j
�|�d�d�}d|vr�|�d�|d<|�d�dur�t	j|d<d|vr�|�d�|d<td||t
fi|��|_|�d�|_|�d�|_dS)a�
        Creates a new service client

        :param dict config:
            Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
            The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
            the dict using :py:meth:`~oci.config.validate_config`

        :param str service_endpoint: (optional)
            The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
            not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
            need to specify a service endpoint.

        :param timeout: (optional)
            The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided
            as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
            a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
        :type timeout: float or tuple(float, float)

        :param signer: (optional)
            The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
            provided in the config parameter.

            One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
            by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
        :type signer: :py:class:`~oci.signer.AbstractBaseSigner`

        :param obj retry_strategy: (optional)
            A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
            Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
            Any value provided at the operation level will override whatever is specified at the client level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
            is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

        :param obj circuit_breaker_strategy: (optional)
            A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
            This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
            The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.

        :param function circuit_breaker_callback: (optional)
            Callback function to receive any exceptions triggerred by the circuit breaker.

        :param bool client_level_realm_specific_endpoint_template_enabled: (optional)
            A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.

        :param allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not
            allow control characters to be in the response object.
        ZrecoveryaThe Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service�signer)r�tenancy�user�fingerprintZkey_file�pass_phraseZkey_content)rrrZprivate_key_file_locationrZprivate_key_contentT�service_endpointz	/20210216z1https://recovery.{region}.oci.{secondLevelDomain}�skip_deserializationF�circuit_breaker_strategy�5client_level_realm_specific_endpoint_template_enabled)Zregional_clientr�	base_pathZservice_endpoint_templateZ#service_endpoint_template_per_realmrrr�timeoutN�allow_control_charsZdatabase_recovery�retry_strategy�circuit_breaker_callback)rZis_service_enabledrr	�getr
rr
rrZGLOBAL_CIRCUIT_BREAKER_STRATEGYZ DEFAULT_CIRCUIT_BREAKER_STRATEGYrr�base_clientrr )�selfZconfig�kwargsrZbase_client_init_kwargs�r%�I/usr/lib/python3.9/site-packages/oci/recovery/database_recovery_client.py�__init__sB3


�

�

zDatabaseRecoveryClient.__init__cs~dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
du�rt
j}
|
�rXt|
t
j��s2|j
�|�|
�|j�|
j|j
j|||	||�d�|||d�	S|j
j|||	||�d�|||d�SdS)aa
        Cancels the scheduled deletion of a protected database, and returns the protected database to an ACTIVE state. You can cancel the deletion only if the protected database is in the DELETE SCHEDULED state.


        :param str protected_database_id: (required)
            The protected database OCID.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/cancel_protected_database_deletion.py.html>`__ to see an example of how to use cancel_protected_database_deletion API.
        �protectedDatabaseIdz@/protectedDatabases/{protectedDatabaseId}/actions/cancelDeletion�POST�"cancel_protected_database_deletionzqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/CancelProtectedDatabaseDeletion�rr�if_match�opc_request_idcsg|]}|�vr|�qSr%r%��.0Z_key�Zexpected_kwargsr%r&�
<listcomp>��zMDatabaseRecoveryClient.cancel_protected_database_deletion.<locals>.<listcomp>z7cancel_protected_database_deletion got unknown kwargs: cSsi|]\}}|tur||�qSr%��missing�r/�k�vr%r%r&�
<dictcomp>�r2zMDatabaseRecoveryClient.cancel_protected_database_deletion.<locals>.<dictcomp>Nr�
Parameter �+ cannot be None, whitespace or empty string�application/jsonr,r-��accept�content-type�if-match�opc-request-idcSs&i|]\}}|tur|dur||�qS�Nr3r5r%r%r&r8�r2r�Zoperation_retry_strategyZclient_retry_strategyr��
resource_path�method�path_params�
header_paramsr�operation_name�api_reference_link�required_arguments�r�iterkeys�
ValueError�	iteritems�
isinstanceZstring_types�len�stripr!r4r"�get_preferred_retry_strategyrr�DEFAULT_RETRY_STRATEGY�NoneRetryStrategy�add_opc_client_retries_header�add_circuit_breaker_callbackr �make_retrying_call�call_api�r#�protected_database_idr$rJrDrErHrI�extra_kwargsrFr6r7rGrr%r0r&r*wsl%��$

��
��z9DatabaseRecoveryClient.cancel_protected_database_deletioncs�dg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�rt
j}|�rZt|t
j��s2|j
�|
�|�|j�|j|j
j|||
|
||�d�|||d�
S|j
j|||
|
||�d�|||d�	SdS)aQ	
        Moves a protected database resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.


        :param str protected_database_id: (required)
            The protected database OCID.

        :param oci.recovery.models.ChangeProtectedDatabaseCompartmentDetails change_protected_database_compartment_details: (required)
            The configuration details required to move a protected database from the existing compartment to a specified compartment.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/change_protected_database_compartment.py.html>`__ to see an example of how to use change_protected_database_compartment API.
        r(zC/protectedDatabases/{protectedDatabaseId}/actions/changeCompartmentr)�%change_protected_database_compartmentzthttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/ChangeProtectedDatabaseCompartmentr+csg|]}|�vr|�qSr%r%r.r0r%r&r1r2zPDatabaseRecoveryClient.change_protected_database_compartment.<locals>.<listcomp>z:change_protected_database_compartment got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8r2zPDatabaseRecoveryClient.change_protected_database_compartment.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8*r2rrBr�	rDrErFrG�bodyrrHrIrJrK)r#rZZ-change_protected_database_compartment_detailsr$rJrDrErHrIr[rFr6r7rGrr%r0r&r\�sp(��$

��
��z<DatabaseRecoveryClient.change_protected_database_compartmentcs�dg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�rt
j}|�rZt|t
j��s2|j
�|
�|�|j�|j|j
j|||
|
||�d�|||d�
S|j
j|||
|
||�d�|||d�	SdS)a�
        Associates the protected database with a new cloud service environment, such as Microsoft Azure.


        :param str protected_database_id: (required)
            The protected database OCID.

        :param oci.recovery.models.ChangeProtectedDatabaseSubscriptionDetails change_protected_database_subscription_details: (required)
            Associate a protected database with a different subscription.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/change_protected_database_subscription.py.html>`__ to see an example of how to use change_protected_database_subscription API.
        r(zD/protectedDatabases/{protectedDatabaseId}/actions/changeSubscriptionr)�&change_protected_database_subscriptionzuhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/ChangeProtectedDatabaseSubscription)rrr-r,csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zQDatabaseRecoveryClient.change_protected_database_subscription.<locals>.<listcomp>z;change_protected_database_subscription got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zQDatabaseRecoveryClient.change_protected_database_subscription.<locals>.<dictcomp>Nrr9r:r;r-r,�r=r>r@r?cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBrr]rK)r#rZZ.change_protected_database_subscription_detailsr$rJrDrErHrIr[rFr6r7rGrr%r0r&r_Nsp(��$

��
��z=DatabaseRecoveryClient.change_protected_database_subscriptioncs�dg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�rt
j}|�rZt|t
j��s2|j
�|
�|�|j�|j|j
j|||
|
||�d�|||d�
S|j
j|||
|
||�d�|||d�	SdS)aI	
        Moves a protection policy resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.


        :param str protection_policy_id: (required)
            The protection policy OCID.

        :param oci.recovery.models.ChangeProtectionPolicyCompartmentDetails change_protection_policy_compartment_details: (required)
            The configuration details required to move a protection policy from the existing compartment to a specified compartment.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/change_protection_policy_compartment.py.html>`__ to see an example of how to use change_protection_policy_compartment API.
        �protectionPolicyIdzB/protectionPolicies/{protectionPolicyId}/actions/changeCompartmentr)�$change_protection_policy_compartmentzrhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/ChangeProtectionPolicyCompartmentr+csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zODatabaseRecoveryClient.change_protection_policy_compartment.<locals>.<listcomp>z9change_protection_policy_compartment got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zODatabaseRecoveryClient.change_protection_policy_compartment.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8r2rrBrr]rK)r#�protection_policy_idZ,change_protection_policy_compartment_detailsr$rJrDrErHrIr[rFr6r7rGrr%r0r&rb�sp(��$

��
��z;DatabaseRecoveryClient.change_protection_policy_compartmentcs�dg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�rt
j}|�rZt|t
j��s2|j
�|
�|�|j�|j|j
j|||
|
||�d�|||d�
S|j
j|||
|
||�d�|||d�	SdS)ax	
        Moves a recovery service subnet resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.


        :param str recovery_service_subnet_id: (required)
            The recovery service subnet OCID.

        :param oci.recovery.models.ChangeRecoveryServiceSubnetCompartmentDetails change_recovery_service_subnet_compartment_details: (required)
            The configuration details required to move a Recovery Service subnet from the existing compartment to a specified compartment.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/change_recovery_service_subnet_compartment.py.html>`__ to see an example of how to use change_recovery_service_subnet_compartment API.
        �recoveryServiceSubnetIdzK/recoveryServiceSubnets/{recoveryServiceSubnetId}/actions/changeCompartmentr)�*change_recovery_service_subnet_compartmentz|https://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/ChangeRecoveryServiceSubnetCompartmentr+csg|]}|�vr|�qSr%r%r.r0r%r&r1_r2zUDatabaseRecoveryClient.change_recovery_service_subnet_compartment.<locals>.<listcomp>z?change_recovery_service_subnet_compartment got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8hr2zUDatabaseRecoveryClient.change_recovery_service_subnet_compartment.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8tr2rrBrr]rK)r#�recovery_service_subnet_idZ2change_recovery_service_subnet_compartment_detailsr$rJrDrErHrIr[rFr6r7rGrr%r0r&re*sp(��$

��
��zADatabaseRecoveryClient.change_recovery_service_subnet_compartmentcs.g}d}d}d}d}gd���fdd�t�|�D�}|rFtd|����d	d	|�d
t�|�dt�|�dt�d
�}	dd�t�|	�D�}	|jj|�d�|jd�}
|
dur�t	j
}
|
�rt|
t	j�s�|j�
|	�|j�|	�|
�|j�|
j|jj|||	|d|�d�|||d�
S|jj|||	|d|�d�|||d�	SdS)aB
        Creates a new Protected Database.


        :param oci.recovery.models.CreateProtectedDatabaseDetails create_protected_database_details: (required)
            Describes the parameters required to create a protected database.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param bool opc_dry_run: (optional)
            Indicates if the request is to test the preparedness for creating a protected database, without actually creating a protected database.

            If you set the `opcDryRun` option as `true`, then Recovery Service only performs a test run to check for any missing prerequisites or configurations required to create a protected database, and then returns error messages to warn you about any missing requirements.

            If an error occurs, you can review, correct, and repeat the dry run until the `createProtectedDatabase` request does not return any errors.

            These are the common issues that you can identify by performing a dry run of the `createProtectedDatabase` request:

            * The Recovery Service subnet has insufficient free IP addresses to support the required number of private endpoints. See, `troubleshooting`__ information
            * Recovery Service does not have permissions to manage the network resources in a chosen compartment
            * Recovery Service is out of capacity. See, `Service Limits`__ for more information
            * Recovery Service resources exceed quota limits
            * A protected database, having the same database ID, already exists
            * The specified protection policy does not exist, or it is not in an Active state
            * The specified Recovery Service subnet does not exist, or it is not in an Active state

            See, `Prerequisites for Using Recovery Service`__ for more information.

            __ https://docs.oracle.com/en/cloud/paas/recovery-service/dbrsu/troubleshoot-backup-failures-recovery-service.html#GUID-05FA08B8-421D-4E52-B84B-7AFB84ADECF9
            __ https://docs.oracle.com/en-us/iaas/Content/General/Concepts/servicelimits.htm
            __ https://docs.oracle.com/en/cloud/paas/recovery-service/dbrsu/backup-recover-recovery-service.html#GUID-B2ABF281-DFF8-4A4E-AC85-629801AAF36A

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.ProtectedDatabase`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/create_protected_database.py.html>`__ to see an example of how to use create_protected_database API.
        �/protectedDatabasesr)�create_protected_databasezihttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/CreateProtectedDatabase)rr�opc_retry_tokenr-�opc_dry_runcsg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zDDatabaseRecoveryClient.create_protected_database.<locals>.<listcomp>z.create_protected_database got unknown kwargs: r;rir-rj)r=r>�opc-retry-tokenr@zopc-dry-runcSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2zDDatabaseRecoveryClient.create_protected_database.<locals>.<dictcomp>rrBN�ProtectedDatabaser�	rDrErGr^�
response_typerrHrIrJ�rrLrMr!r4rNr"rRrrrSrOrTZadd_opc_retry_token_if_neededrUrVr rWrX)r#Z!create_protected_database_detailsr$rJrDrErHrIr[rGrr%r0r&rh�sh<�


����z0DatabaseRecoveryClient.create_protected_databasecs"g}d}d}d}d}gd���fdd�t�|�D�}|rFtd|����d	d	|�d
t�|�dt�d�}	d
d�t�|	�D�}	|jj|�d�|jd�}
|
dur�t	j
}
|
r�t|
t	j�s�|j�
|	�|j�|	�|
�|j�|
j|jj|||	|d|�d�|||d�
S|jj|||	|d|�d�|||d�	SdS)a�
        Creates a new Protection Policy.


        :param oci.recovery.models.CreateProtectionPolicyDetails create_protection_policy_details: (required)
            Describes the parameters required to create a custom protection policy.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.ProtectionPolicy`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/create_protection_policy.py.html>`__ to see an example of how to use create_protection_policy API.
        �/protectionPoliciesr)�create_protection_policyzghttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/CreateProtectionPolicy�rrrir-csg|]}|�vr|�qSr%r%r.r0r%r&r1Er2zCDatabaseRecoveryClient.create_protection_policy.<locals>.<listcomp>z-create_protection_policy got unknown kwargs: r;rir-�r=r>rkr@cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8Pr2zCDatabaseRecoveryClient.create_protection_policy.<locals>.<dictcomp>rrBN�ProtectionPolicyrrmro)r#Z create_protection_policy_detailsr$rJrDrErHrIr[rGrr%r0r&rqsf%�

����z/DatabaseRecoveryClient.create_protection_policycs"g}d}d}d}d}gd���fdd�t�|�D�}|rFtd|����d	d	|�d
t�|�dt�d�}	d
d�t�|	�D�}	|jj|�d�|jd�}
|
dur�t	j
}
|
r�t|
t	j�s�|j�
|	�|j�|	�|
�|j�|
j|jj|||	|d|�d�|||d�
S|jj|||	|d|�d�|||d�	SdS)a�
        Creates a new Recovery Service Subnet.


        :param oci.recovery.models.CreateRecoveryServiceSubnetDetails create_recovery_service_subnet_details: (required)
            Describes the parameters required to create a recovery service subnet.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.RecoveryServiceSubnet`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/create_recovery_service_subnet.py.html>`__ to see an example of how to use create_recovery_service_subnet API.
        �/recoveryServiceSubnetsr)�create_recovery_service_subnetzqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/CreateRecoveryServiceSubnetrrcsg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zIDatabaseRecoveryClient.create_recovery_service_subnet.<locals>.<listcomp>z3create_recovery_service_subnet got unknown kwargs: r;rir-rscSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2zIDatabaseRecoveryClient.create_recovery_service_subnet.<locals>.<dictcomp>rrBN�RecoveryServiceSubnetrrmro)r#Z&create_recovery_service_subnet_detailsr$rJrDrErHrIr[rGrr%r0r&rvusf%�

����z5DatabaseRecoveryClient.create_recovery_service_subnetcs�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qnd|vr�ddg}|d|vr�td|����d|�dt	�i}
dd�t�|
�D�}
dd|�dt	�|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}|du�rTt
j}|�r�t|t
j��s�|j
�|�|�|j�|j|j
j|||	|
||�d�|||d�
S|j
j|||	|
||�d�|||d�	SdS)a0

        Deletes a protected database based on the specified protected database ID.


        :param str protected_database_id: (required)
            The protected database OCID.

        :param str deletion_schedule: (optional)
            Defines a preferred schedule to delete a protected database after you terminate the source database.
            * The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated .
            * The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.

            Allowed values are: "DELETE_AFTER_RETENTION_PERIOD", "DELETE_AFTER_72_HOURS"

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/delete_protected_database.py.html>`__ to see an example of how to use delete_protected_database API.
        r(�)/protectedDatabases/{protectedDatabaseId}�DELETE�delete_protected_databasezihttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/DeleteProtectedDatabase)rr�deletion_scheduler,r-csg|]}|�vr|�qSr%r%r.r0r%r&r1r2zDDatabaseRecoveryClient.delete_protected_database.<locals>.<listcomp>z.delete_protected_database got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8r2zDDatabaseRecoveryClient.delete_protected_database.<locals>.<dictcomp>Nrr9r:r{ZDELETE_AFTER_RETENTION_PERIODZDELETE_AFTER_72_HOURSz6Invalid value for `deletion_schedule`, must be one of ZdeletionSchedulecSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8*r2r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r82r2rrBr)	rDrErF�query_paramsrGrrHrIrJrK)r#rZr$rJrDrErHrIr[rFr6r7Z deletion_schedule_allowed_valuesr|rGrr%r0r&rz�s�,��$��

��
��z0DatabaseRecoveryClient.delete_protected_databasecs~dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
du�rt
j}
|
�rXt|
t
j��s2|j
�|�|
�|j�|
j|j
j|||	||�d�|||d�	S|j
j|||	||�d�|||d�SdS)a,
        Deletes a specified protection policy. You can delete custom policies only.
        Deleting a Oracle predefined policies will result in status code 405 Method Not Allowed.


        :param str protection_policy_id: (required)
            The protection policy OCID.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/delete_protection_policy.py.html>`__ to see an example of how to use delete_protection_policy API.
        ra�(/protectionPolicies/{protectionPolicyId}ry�delete_protection_policyzghttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/DeleteProtectionPolicyr+csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zCDatabaseRecoveryClient.delete_protection_policy.<locals>.<listcomp>z-delete_protection_policy got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zCDatabaseRecoveryClient.delete_protection_policy.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBrrCrK�r#rcr$rJrDrErHrIr[rFr6r7rGrr%r0r&r~Vsl&��$

��
��z/DatabaseRecoveryClient.delete_protection_policycs~dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
du�rt
j}
|
�rXt|
t
j��s2|j
�|�|
�|j�|
j|j
j|||	||�d�|||d�	S|j
j|||	||�d�|||d�SdS)a�
        Deletes a specified recovery service subnet.


        :param str recovery_service_subnet_id: (required)
            The recovery service subnet OCID.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/delete_recovery_service_subnet.py.html>`__ to see an example of how to use delete_recovery_service_subnet API.
        rd�1/recoveryServiceSubnets/{recoveryServiceSubnetId}ry�delete_recovery_service_subnetzqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/DeleteRecoveryServiceSubnetr+csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zIDatabaseRecoveryClient.delete_recovery_service_subnet.<locals>.<listcomp>z3delete_recovery_service_subnet got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zIDatabaseRecoveryClient.delete_recovery_service_subnet.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8r2rrBrrCrK�r#rfr$rJrDrErHrIr[rFr6r7rGrr%r0r&r��sl%��$

��
��z5DatabaseRecoveryClient.delete_recovery_service_subnetc
s�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
du�rt
j}
|
�rbt|
t
j��s2|j
�|�|
�|j�|
j|j
j|||	||�d�d|�d�|||d�S|j
j|||	||�d�d|�d�|||d�
SdS)a�
        Downloads the network service configuration file 'tnsnames.ora' for a specified protected database. Applies to user-defined recovery systems only.


        :param str protected_database_id: (required)
            The protected database OCID.

        :param oci.recovery.models.FetchProtectedDatabaseConfigurationDetails fetch_protected_database_configuration_details: (optional)
            Which configuration to get

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type stream
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/fetch_protected_database_configuration.py.html>`__ to see an example of how to use fetch_protected_database_configuration API.
        r(zB/protectedDatabases/{protectedDatabaseId}/actions/getConfigurationr)�&fetch_protected_database_configurationzuhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/FetchProtectedDatabaseConfiguration)rr�.fetch_protected_database_configuration_detailsr-r,csg|]}|�vr|�qSr%r%r.r0r%r&r1_r2zQDatabaseRecoveryClient.fetch_protected_database_configuration.<locals>.<listcomp>z;fetch_protected_database_configuration got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8hr2zQDatabaseRecoveryClient.fetch_protected_database_configuration.<locals>.<dictcomp>Nrr9r:r;r-r,r`cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8tr2rrBr��streamr)
rDrErFrGr^rnrrHrIrJrKrYr%r0r&r�)st(��$

��
�
�z=DatabaseRecoveryClient.fetch_protected_database_configurationcsvdg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
dur�t
j}
|
�rNt|
t
j��s&|j
�|�|
�|j�|
j|j
j|||	|d|�d�|||d�
S|j
j|||	|d|�d�|||d�	SdS)aN
        Gets information about a specified protected database.


        :param str protected_database_id: (required)
            The protected database OCID.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.ProtectedDatabase`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/get_protected_database.py.html>`__ to see an example of how to use get_protected_database API.
        r(rx�GET�get_protected_databasezfhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/GetProtectedDatabase�rrr-csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zADatabaseRecoveryClient.get_protected_database.<locals>.<listcomp>z+get_protected_database got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zADatabaseRecoveryClient.get_protected_database.<locals>.<dictcomp>Nrr9r:r;r-�r=r>r@cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBrlr�	rDrErFrGrnrrHrIrJrKrYr%r0r&r��sn��$
����z-DatabaseRecoveryClient.get_protected_databasecsvdg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
dur�t
j}
|
�rNt|
t
j��s&|j
�|�|
�|j�|
j|j
j|||	|d|�d�|||d�
S|j
j|||	|d|�d�|||d�	SdS)aH
        Gets information about a specified protection policy.


        :param str protection_policy_id: (required)
            The protection policy OCID.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.ProtectionPolicy`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/get_protection_policy.py.html>`__ to see an example of how to use get_protection_policy API.
        rar}r��get_protection_policyzdhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/GetProtectionPolicyr�csg|]}|�vr|�qSr%r%r.r0r%r&r1&r2z@DatabaseRecoveryClient.get_protection_policy.<locals>.<listcomp>z*get_protection_policy got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8/r2z@DatabaseRecoveryClient.get_protection_policy.<locals>.<dictcomp>Nrr9r:r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8:r2rrBrtrr�rKrr%r0r&r��sn��$
����z,DatabaseRecoveryClient.get_protection_policycsvdg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
dur�t
j}
|
�rNt|
t
j��s&|j
�|�|
�|j�|
j|j
j|||	|d|�d�|||d�
S|j
j|||	|d|�d�|||d�	SdS)ak
        Gets information about a specified recovery service subnet.


        :param str recovery_service_subnet_id: (required)
            The recovery service subnet OCID.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.RecoveryServiceSubnet`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/get_recovery_service_subnet.py.html>`__ to see an example of how to use get_recovery_service_subnet API.
        rdr�r��get_recovery_service_subnetznhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/GetRecoveryServiceSubnetr�csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zFDatabaseRecoveryClient.get_recovery_service_subnet.<locals>.<listcomp>z0get_recovery_service_subnet got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zFDatabaseRecoveryClient.get_recovery_service_subnet.<locals>.<dictcomp>Nrr9r:r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBrwrr�rKr�r%r0r&r�^sn��$
����z2DatabaseRecoveryClient.get_recovery_service_subnetcsvdg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
dur�t
j}
|
�rNt|
t
j��s&|j
�|�|
�|j�|
j|j
j|||	|d|�d�|||d�
S|j
j|||	|d|�d�|||d�	SdS)a>
        Gets the status of the work request based on the specified ID


        :param str work_request_id: (required)
            The OCID of the work request.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.WorkRequest`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
        �
workRequestIdz/workRequests/{workRequestId}r��get_work_requestzZhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/WorkRequest/GetWorkRequestr�csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2z;DatabaseRecoveryClient.get_work_request.<locals>.<listcomp>z%get_work_request got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2z;DatabaseRecoveryClient.get_work_request.<locals>.<dictcomp>Nrr9r:r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBZWorkRequestrr�rK)r#�work_request_idr$rJrDrErHrIr[rFr6r7rGrr%r0r&r��sn��$
����z'DatabaseRecoveryClient.get_work_requestc
sdg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d
|vrrgd�}	|d
|	vrrtd|	����d
|vr�ddg}
|d
|
vr�td|
����d|vr�ddg}|d|vr�td|����||�d
t�|�dt�|�dt�|�dt�|�dt�|�dt�|�dt�|�d
t�|�dt�d�
}dd�t�|�D�}dd|�dt�d �}
d!d�t�|
�D�}
|jj|�d"�|jd#�}|d$u�r�t	j
}|�r�t|t	j��s�|j�
|
�|�|j�|j|jj||||
d%|�d&�|||d'�
S|jj||||
d%|�d&�|||d'�	Sd$S)(a�
        Lists the protected databases based on the specified parameters.


        :param str compartment_id: (required)
            The compartment OCID.

        :param str lifecycle_state: (optional)
            A filter to return only the resources that match the specified lifecycle state.

            Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETE_SCHEDULED", "DELETING", "DELETED", "FAILED"

        :param str display_name: (optional)
            A filter to return only resources that match the entire 'displayname' given.

        :param str id: (optional)
            The protected database OCID.

        :param str protection_policy_id: (optional)
            The protection policy OCID.

        :param str recovery_service_subnet_id: (optional)
            The recovery service subnet OCID.

        :param int limit: (optional)
            The maximum number of items to return per page.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param str sort_order: (optional)
            The sort order to use, either ascending (ASC) or descending (DESC).
            Allowed values are:
              - ASC
              - DESC

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If you do not specify a value, then TIMECREATED is used as the default sort order.
            Allowed values are:
              - TIMECREATED
              - DISPLAYNAME

            Allowed values are: "timeCreated", "displayName"

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.ProtectedDatabaseCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/list_protected_databases.py.html>`__ to see an example of how to use list_protected_databases API.
        �
compartmentIdrgr��list_protected_databaseszrhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabaseCollection/ListProtectedDatabases)rr�lifecycle_state�display_name�idrcrf�limit�page�
sort_order�sort_byr-csg|]}|�vr|�qSr%r%r.r0r%r&r1|r2zCDatabaseRecoveryClient.list_protected_databases.<locals>.<listcomp>z-list_protected_databases got unknown kwargs: r��ZCREATINGZUPDATINGZACTIVEZDELETE_SCHEDULEDZDELETINGZDELETED�FAILED�4Invalid value for `lifecycle_state`, must be one of r��ASC�DESC�/Invalid value for `sort_order`, must be one of r��timeCreated�displayName�,Invalid value for `sort_by`, must be one of r�r�rcrfr�r�)
r��lifecycleStater�r�rardr�r��	sortOrder�sortBycSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2zCDatabaseRecoveryClient.list_protected_databases.<locals>.<dictcomp>r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBNZProtectedDatabaseCollectionr�	rDrEr|rGrnrrHrIrJ�rrLrMr!r4rNr"rRrrrSrOrTrUrVr rWrX�r#�compartment_idr$rJrDrErHrIr[�lifecycle_state_allowed_values�sort_order_allowed_values�sort_by_allowed_valuesr|rGrr%r0r&r�"s�E����








�
��
��z/DatabaseRecoveryClient.list_protected_databasescs(dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d
|vrrgd�}	|d
|	vrrtd|	����d
|vr�ddg}
|d
|
vr�td|
����d|vr�ddg}|d|vr�td|����d|vr�ddg}|d|vr�td|����||�d
t�|�dt�|�dt�|�d
t�|�dt�|�dt�|�dt�|�dt�d�	}
dd�t�|
�D�}
d d |�d!t�d"�}d#d�t�|�D�}|jj|�d$�|jd%�}|d&u�r�t	j
}|�rt|t	j��s�|j�
|�|�|j�|j|jj|||
|d'|�d(�|||d)�
S|jj|||
|d'|�d(�|||d)�	Sd&S)*a�
        Gets a list of protection policies based on the specified parameters.


        :param str compartment_id: (required)
            The compartment OCID.

        :param str lifecycle_state: (optional)
            A filter to return only resources their lifecycleState matches the given lifecycleState.

            Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETE_SCHEDULED", "DELETING", "DELETED", "FAILED"

        :param str display_name: (optional)
            A filter to return only resources that match the entire 'displayname' given.

        :param str protection_policy_id: (optional)
            The protection policy OCID.

        :param str owner: (optional)
            A filter to return only the policies that match the owner as 'Customer' or 'Oracle'.

            Allowed values are: "oracle", "customer"

        :param int limit: (optional)
            The maximum number of items to return. Specify a value greater than 4.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param str sort_order: (optional)
            The sort order to use, either ascending (ASC) or descending (DESC).
            Allowed values are:
              - ASC
              - DESC

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If you do not specify a value, then TIMECREATED is used as the default sort order.
            Allowed values are:
              - TIMECREATED
              - DISPLAYNAME

            Allowed values are: "timeCreated", "displayName"

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.ProtectionPolicyCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/list_protection_policies.py.html>`__ to see an example of how to use list_protection_policies API.
        r�rpr��list_protection_policieszqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicyCollection/ListProtectionPolicies)rrr�r�rc�ownerr�r�r�r�r-csg|]}|�vr|�qSr%r%r.r0r%r&r1%r2zCDatabaseRecoveryClient.list_protection_policies.<locals>.<listcomp>z-list_protection_policies got unknown kwargs: r�r�r�r�ZoracleZcustomerz*Invalid value for `owner`, must be one of r�r�r�r�r�r�r�r�r�rcr�r�)	r�r�r�rar�r�r�r�r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8Qr2zCDatabaseRecoveryClient.list_protection_policies.<locals>.<dictcomp>r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8Xr2rrBNZProtectionPolicyCollectionrr�r�)r#r�r$rJrDrErHrIr[r�Zowner_allowed_valuesr�r�r|rGrr%r0r&r��s�D
�����







�
��
��z/DatabaseRecoveryClient.list_protection_policiescs�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d
|vrrgd�}	|d
|	vrrtd|	����d
|vr�ddg}
|d
|
vr�td|
����d|vr�ddg}|d|vr�td|����||�d
t�|�dt�|�dt�|�dt�|�dt�|�dt�|�d
t�|�dt�d�	}dd�t�|�D�}dd|�dt�d�}
d d�t�|
�D�}
|jj|�d!�|jd"�}|d#u�r�t	j
}|�r�t|t	j��s�|j�
|
�|�|j�|j|jj||||
d$|�d%�|||d&�
S|jj||||
d$|�d%�|||d&�	Sd#S)'au
        Returns a list of Recovery Service Subnets.


        :param str compartment_id: (required)
            The compartment OCID.

        :param str lifecycle_state: (optional)
            A filter to return only the resources that match the specified lifecycle state.

            Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETE_SCHEDULED", "DELETING", "DELETED", "FAILED"

        :param str display_name: (optional)
            A filter to return only resources that match the entire 'displayname' given.

        :param str id: (optional)
            The recovery service subnet OCID.

        :param str vcn_id: (optional)
            The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.

        :param int limit: (optional)
            The maximum number of items to return per page.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param str sort_order: (optional)
            The sort order to use, either ascending (ASC) or descending (DESC).
            Allowed values are:
              - ASC
              - DESC

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If you do not specify a value, then TIMECREATED is used as the default sort order.
            Allowed values are:
              - TIMECREATED
              - DISPLAYNAME

            Allowed values are: "timeCreated", "displayName"

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.RecoveryServiceSubnetCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/list_recovery_service_subnets.py.html>`__ to see an example of how to use list_recovery_service_subnets API.
        r�rur��list_recovery_service_subnetszzhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnetCollection/ListRecoveryServiceSubnets)rrr�r�r��vcn_idr�r�r�r�r-csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zHDatabaseRecoveryClient.list_recovery_service_subnets.<locals>.<listcomp>z2list_recovery_service_subnets got unknown kwargs: r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)	r�r�r�r�ZvcnIdr�r�r�r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2zHDatabaseRecoveryClient.list_recovery_service_subnets.<locals>.<dictcomp>r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBNZRecoveryServiceSubnetCollectionrr�r�r�r%r0r&r�|s�B
����







�
��
��z4DatabaseRecoveryClient.list_recovery_service_subnetsc
sdg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qnd|vr�dg}|d|vr�td|����d|vr�ddg}
|d|
vr�td|
����|�dt	�|�dt	�|�dt	�|�dt	�d�}dd�t�|�D�}dd|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd �}|du�r�t
j}|�r�t|t
j��s�|j
�|�|�|j�|j|j
j|||	||d!|�d"�|||d#�S|j
j|||	||d!|�d"�|||d#�
SdS)$a.	
        Return a (paginated) list of errors for a given work request.


        :param str work_request_id: (required)
            The OCID of the work request.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param int limit: (optional)
            The maximum number of items to return per page.

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending.

            Allowed values are: "timeCreated"

        :param str sort_order: (optional)
            The sort order to use, either ascending (ASC) or descending (DESC).
            Allowed values are:
              - ASC
              - DESC

            Allowed values are: "ASC", "DESC"

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.WorkRequestErrorCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API.
        r�z$/workRequests/{workRequestId}/errorsr��list_work_request_errorszphttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/WorkRequestErrorCollection/ListWorkRequestErrors�rrr-r�r�r�r�csg|]}|�vr|�qSr%r%r.r0r%r&r1c	r2zCDatabaseRecoveryClient.list_work_request_errors.<locals>.<listcomp>z-list_work_request_errors got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8l	r2zCDatabaseRecoveryClient.list_work_request_errors.<locals>.<dictcomp>Nrr9r:r�r�r�r�r�r�r�r�r��r�r�r�r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�	r2r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�	r2rrBZWorkRequestErrorCollectionr�
rDrErFr|rGrnrrHrIrJrK�r#r�r$rJrDrErHrIr[rFr6r7r�r�r|rGrr%r0r&r�"	s�1	��$��



�
��
�
�z/DatabaseRecoveryClient.list_work_request_errorsc
sdg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qnd|vr�dg}|d|vr�td|����d|vr�ddg}
|d|
vr�td|
����|�dt	�|�dt	�|�dt	�|�dt	�d�}dd�t�|�D�}dd|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd �}|du�r�t
j}|�r�t|t
j��s�|j
�|�|�|j�|j|j
j|||	||d!|�d"�|||d#�S|j
j|||	||d!|�d"�|||d#�
SdS)$a+	
        Return a (paginated) list of logs for a given work request.


        :param str work_request_id: (required)
            The OCID of the work request.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param int limit: (optional)
            The maximum number of items to return per page.

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending.

            Allowed values are: "timeCreated"

        :param str sort_order: (optional)
            The sort order to use, either ascending (ASC) or descending (DESC).
            Allowed values are:
              - ASC
              - DESC

            Allowed values are: "ASC", "DESC"

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.WorkRequestLogEntryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API.
        r�z"/workRequests/{workRequestId}/logsr��list_work_request_logszqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/WorkRequestLogEntryCollection/ListWorkRequestLogsr�csg|]}|�vr|�qSr%r%r.r0r%r&r1�	r2zADatabaseRecoveryClient.list_work_request_logs.<locals>.<listcomp>z+list_work_request_logs got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�	r2zADatabaseRecoveryClient.list_work_request_logs.<locals>.<dictcomp>Nrr9r:r�r�r�r�r�r�r�r�r�r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8
r2r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8
r2rrBZWorkRequestLogEntryCollectionrr�rKr�r%r0r&r��	s�1	��$��



�
��
�
�z-DatabaseRecoveryClient.list_work_request_logscs�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d
|vrrgd�}	|d
|	vrrtd|	����d
|vr�ddg}
|d
|
vr�td|
����d|vr�dg}|d|vr�td|����||�dt�|�d
t�|�dt�|�dt�|�dt�|�d
t�|�dt�d�}dd�t�|�D�}dd|�dt�d�}
dd�t�|
�D�}
|jj|�d�|jd �}|d!u�rvt	j
}|�r�t|t	j��s�|j�
|
�|�|j�|j|jj||||
d"|�d#�|||d$�
S|jj||||
d"|�d#�|||d$�	Sd!S)%a�

        Lists the work requests in a compartment.


        :param str compartment_id: (required)
            The compartment OCID.

        :param str work_request_id: (optional)
            Unique Oracle-assigned identifier of the work request.

        :param str status: (optional)
            A filter to return only resources their lifecycleState matches the given OperationStatus.

            Allowed values are: "ACCEPTED", "WAITING", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"

        :param str resource_id: (optional)
            The ID of the resource affected by the work request.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param str page: (optional)
            The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

        :param int limit: (optional)
            The maximum number of items to return per page.

        :param str sort_order: (optional)
            The sort order to use, either ascending (ASC) or descending (DESC).
            Allowed values are:
              - ASC
              - DESC

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

            Allowed values are: "timeAccepted"

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.recovery.models.WorkRequestSummaryCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
        r�z
/workRequestsr��list_work_requestszmhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/WorkRequestSummaryCollection/ListWorkRequests)
rrr��status�resource_idr-r�r�r�r�csg|]}|�vr|�qSr%r%r.r0r%r&r1�
r2z=DatabaseRecoveryClient.list_work_requests.<locals>.<listcomp>z'list_work_requests got unknown kwargs: r�)ZACCEPTEDZWAITINGZIN_PROGRESSr�Z	SUCCEEDEDZ	CANCELINGZCANCELEDz+Invalid value for `status`, must be one of r�r�r�r�r�ZtimeAcceptedr�r�r�r�r�)r�r�r�Z
resourceIdr�r�r�r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�
r2z=DatabaseRecoveryClient.list_work_requests.<locals>.<dictcomp>r;r-r�cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�
r2rrBNZWorkRequestSummaryCollectionrr�r�)r#r�r$rJrDrErHrIr[Zstatus_allowed_valuesr�r�r|rGrr%r0r&r�D
s�<����






�

��
��z)DatabaseRecoveryClient.list_work_requestscs�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qndd|�dt	�|�dt	�d�}dd�t�|�D�}|j
j|�d�|jd�}
|
du�rt
j}
|
�r`t|
t
j��s2|j
�|�|
�|j�|
j|j
j|||	||�d�|�d�|||d�
S|j
j|||	||�d�|�d�|||d�	SdS)a&

        Defines a preferred schedule to delete a protected database after you terminate the source database.
        The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated.
        The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.


        :param str protected_database_id: (required)
            The protected database OCID.

        :param oci.recovery.models.ScheduleProtectedDatabaseDeletionDetails schedule_protected_database_deletion_details: (optional)
            The details for scheduling deletion of the protected database

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/schedule_protected_database_deletion.py.html>`__ to see an example of how to use schedule_protected_database_deletion API.
        r(zB/protectedDatabases/{protectedDatabaseId}/actions/scheduleDeletionr)�$schedule_protected_database_deletionzshttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/ScheduleProtectedDatabaseDeletion)rr�,schedule_protected_database_deletion_detailsr,r-csg|]}|�vr|�qSr%r%r.r0r%r&r1r2zODatabaseRecoveryClient.schedule_protected_database_deletion.<locals>.<listcomp>z9schedule_protected_database_deletion got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8#r2zODatabaseRecoveryClient.schedule_protected_database_deletion.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8/r2rrBr�rr]rKrYr%r0r&r��
sp*��$

��
��z;DatabaseRecoveryClient.schedule_protected_database_deletioncs�dg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�rt
j}|�rZt|t
j��s2|j
�|
�|�|j�|j|j
j|||
|
||�d�|||d�
S|j
j|||
|
||�d�|||d�	SdS)aa
        Updates the Protected Database


        :param str protected_database_id: (required)
            The protected database OCID.

        :param oci.recovery.models.UpdateProtectedDatabaseDetails update_protected_database_details: (required)
            Describes the parameters required to update a protected database.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/update_protected_database.py.html>`__ to see an example of how to use update_protected_database API.
        r(rx�PUT�update_protected_databasezihttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/UpdateProtectedDatabaser+csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zDDatabaseRecoveryClient.update_protected_database.<locals>.<listcomp>z.update_protected_database got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zDDatabaseRecoveryClient.update_protected_database.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8�r2rrBrr]rK)r#rZZ!update_protected_database_detailsr$rJrDrErHrIr[rFr6r7rGrr%r0r&r�Ssp(��$

��
��z0DatabaseRecoveryClient.update_protected_databasecs�dg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�rt
j}|�rZt|t
j��s2|j
�|
�|�|j�|j|j
j|||
|
||�d�|||d�
S|j
j|||
|
||�d�|||d�	SdS)aB
        Updates the specified protection policy.


        :param str protection_policy_id: (required)
            The protection policy OCID.

        :param oci.recovery.models.UpdateProtectionPolicyDetails update_protection_policy_details: (required)
            The information to be updated.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/update_protection_policy.py.html>`__ to see an example of how to use update_protection_policy API.
        rar}r��update_protection_policyzghttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/UpdateProtectionPolicyr+csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2zCDatabaseRecoveryClient.update_protection_policy.<locals>.<listcomp>z-update_protection_policy got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8�r2zCDatabaseRecoveryClient.update_protection_policy.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8r2rrBrr]rK)r#rcZ update_protection_policy_detailsr$rJrDrErHrIr[rFr6r7rGrr%r0r&r��sp(��$

��
��z/DatabaseRecoveryClient.update_protection_policycs�dg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�rt
j}|�rZt|t
j��s2|j
�|
�|�|j�|j|j
j|||
|
||�d�|||d�
S|j
j|||
|
||�d�|||d�	SdS)a�
        Updates the specified recovery service subnet.


        :param str recovery_service_subnet_id: (required)
            The recovery service subnet OCID.

        :param oci.recovery.models.UpdateRecoveryServiceSubnetDetails update_recovery_service_subnet_details: (required)
            Describes the parameters required to update a recovery service subnet.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :param str opc_request_id: (optional)
            Unique identifier for the request.

        :param obj retry_strategy: (optional)
            A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

            This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
            The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.

            To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.

        :param bool allow_control_chars: (optional)
            allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
            By default, the response will not allow control characters in strings

        :return: A :class:`~oci.response.Response` object with data of type None
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/recovery/update_recovery_service_subnet.py.html>`__ to see an example of how to use update_recovery_service_subnet API.
        rdr�r��update_recovery_service_subnetzqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/UpdateRecoveryServiceSubnetr+csg|]}|�vr|�qSr%r%r.r0r%r&r1dr2zIDatabaseRecoveryClient.update_recovery_service_subnet.<locals>.<listcomp>z3update_recovery_service_subnet got unknown kwargs: cSsi|]\}}|tur||�qSr%r3r5r%r%r&r8mr2zIDatabaseRecoveryClient.update_recovery_service_subnet.<locals>.<dictcomp>Nrr9r:r;r,r-r<cSs&i|]\}}|tur|dur||�qSrAr3r5r%r%r&r8yr2rrBrr]rK)r#rfZ&update_recovery_service_subnet_detailsr$rJrDrErHrIr[rFr6r7rGrr%r0r&r�/sp(��$

��
��z5DatabaseRecoveryClient.update_recovery_service_subnetN)�__name__�
__module__�__qualname__�__doc__r'r*r\r_rbrerhrqrvrzr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r%r%r%r&rsD[innnn{bbjiqbbbb,0'qnnrN)Z
__future__rZoci._vendorrrZocirrZoci.base_clientrZ
oci.configrr	Z
oci.signerr
Zoci.utilrrr
Zoci.exceptionsrZ	oci.alloyrZmodelsrr4�objectrr%r%r%r&�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit