o
    ɶd]3                    @   s   d dl mZ d dlmZ d dlmZ d dlmZmZ d dlm	Z	 d dl
mZmZ d dlmZ d dlmZmZmZ d	d
lmZ edZG dd deZdS )    )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   )recovery_type_mappingZMissingc                   @   s   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.d/ Zd0d1 Zd2S )3DatabaseRecoveryClientz\
    Use Oracle Database Autonomous Recovery Service API to manage Protected Databases.
    c              
   K   s  t ||dd d|v r|d }n"t|v rt|}nt|d |d |d |dt|d|dd	}d
|dddi |dd|dtj|dd}d|v rY|d|d< |ddu retj|d< d|v rp|d|d< t	d||t
fi || _|d| _|d| _dS )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.
        signer)r   tenancyuserfingerprintZkey_filepass_phraseZkey_content)r   r   r   Zprivate_key_file_locationr   Zprivate_key_contentTservice_endpointz	/20210216z1https://recovery.{region}.oci.{secondLevelDomain}skip_deserializationFcircuit_breaker_strategy5client_level_realm_specific_endpoint_template_enabled)Zregional_clientr   	base_pathZservice_endpoint_templateZ#service_endpoint_template_per_realmr   r   r   timeoutNallow_control_charsZdatabase_recoveryretry_strategycircuit_breaker_callback)r	   getr   r   r
   r   r   ZGLOBAL_CIRCUIT_BREAKER_STRATEGYZ DEFAULT_CIRCUIT_BREAKER_STRATEGYr   r   base_clientr   r   )selfconfigkwargsr   Zbase_client_init_kwargs r$   Iusr/lib/python3.10/site-packages/oci/recovery/database_recovery_client.py__init__   s>   3





zDatabaseRecoveryClient.__init__c                    v  dg}d}d}d}d}g d  fddt |D }	|	r$td	|	d|i}
d
d t |
D }
t |
D ]\}}|du sMt|t jrTt| dkrTtd|q7dd|	dt
|	dt
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| || j |j| jj|||
|||	d|||d
S | jj|||
|||	d|||d	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.
        protectedDatabaseIdzC/protectedDatabases/{protectedDatabaseId}/actions/changeCompartmentPOST%change_protected_database_compartmentzthttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/ChangeProtectedDatabaseCompartmentr   r   if_matchopc_request_idc                       g | ]}| vr|qS r$   r$   .0_keyZexpected_kwargsr$   r%   
<listcomp>       zPDatabaseRecoveryClient.change_protected_database_compartment.<locals>.<listcomp>z>change_protected_database_compartment got unknown kwargs: {!r}c                 S      i | ]\}}|t ur||qS r$   missingr0   kvr$   r$   r%   
<dictcomp>       zPDatabaseRecoveryClient.change_protected_database_compartment.<locals>.<dictcomp>Nr   7Parameter {} cannot be None, whitespace or empty stringapplication/jsonr,   r-   acceptcontent-typeif-matchopc-request-idc                 S   &   i | ]\}}|t ur|d ur||qS Nr6   r8   r$   r$   r%   r;         & r   Zoperation_retry_strategyZclient_retry_strategyr   	resource_pathmethodpath_paramsheader_paramsbodyr   operation_nameapi_reference_linkrequired_argumentsr   iterkeys
ValueErrorformat	iteritems
isinstanceZstring_typeslenstripr   r7   r    get_preferred_retry_strategyr   r   DEFAULT_RETRY_STRATEGYNoneRetryStrategyadd_opc_client_retries_headeradd_circuit_breaker_callbackr   make_retrying_callcall_api)r!   protected_database_idZ-change_protected_database_compartment_detailsr#   rP   rI   rJ   rN   rO   extra_kwargsrK   r9   r:   rL   r   r$   r2   r%   r*   r   r   ($

z<DatabaseRecoveryClient.change_protected_database_compartmentc                    r'   )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+   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zODatabaseRecoveryClient.change_protection_policy_compartment.<locals>.<listcomp>z=change_protection_policy_compartment got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zODatabaseRecoveryClient.change_protection_policy_compartment.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   *  rF   r   rG   r   rH   rQ   )r!   protection_policy_idZ,change_protection_policy_compartment_detailsr#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   rd      rb   z;DatabaseRecoveryClient.change_protection_policy_compartmentc                    r'   )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+   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zUDatabaseRecoveryClient.change_recovery_service_subnet_compartment.<locals>.<listcomp>zCchange_recovery_service_subnet_compartment got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zUDatabaseRecoveryClient.change_recovery_service_subnet_compartment.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   r   rH   rQ   )r!   recovery_service_subnet_idZ2change_recovery_service_subnet_compartment_detailsr#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   rg   N  rb   zADatabaseRecoveryClient.change_recovery_service_subnet_compartmentc                      g }d}d}d}d}g d  fddt |D }|r#td|d	d	|d
t|dtd}	dd t |	D }	| jj|d| j	d}
|
du rOt
j}
|
r}t|
t
jsi| j|	 | j|	 |
| j |
j| jj|||	|d|d|||d
S | jj|||	|d|d|||d	S )a  
        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 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r   r   opc_retry_tokenr-   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zDDatabaseRecoveryClient.create_protected_database.<locals>.<listcomp>z2create_protected_database got unknown kwargs: {!r}r>   rm   r-   r@   rA   zopc-retry-tokenrC   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   zDDatabaseRecoveryClient.create_protected_database.<locals>.<dictcomp>r   rG   NProtectedDatabaser   	rI   rJ   rL   rM   response_typer   rN   rO   rP   r   rR   rS   rT   r   r7   rU   r    rY   r   r   rZ   rV   r[   Zadd_opc_retry_token_if_neededr\   r]   r   r^   r_   )r!   Z!create_protected_database_detailsr#   rP   rI   rJ   rN   rO   ra   rL   r   r$   r2   r%   rk     f   %

z0DatabaseRecoveryClient.create_protected_databasec                    ri   )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/CreateProtectionPolicyrl   c                    r.   r$   r$   r/   r2   r$   r%   r3   P  r4   zCDatabaseRecoveryClient.create_protection_policy.<locals>.<listcomp>z1create_protection_policy got unknown kwargs: {!r}r>   rm   r-   rn   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   [  rF   zCDatabaseRecoveryClient.create_protection_policy.<locals>.<dictcomp>r   rG   NProtectionPolicyr   rp   rr   )r!   Z create_protection_policy_detailsr#   rP   rI   rJ   rN   rO   ra   rL   r   r$   r2   r%   ru     rs   z/DatabaseRecoveryClient.create_protection_policyc                    ri   )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/CreateRecoveryServiceSubnetrl   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zIDatabaseRecoveryClient.create_recovery_service_subnet.<locals>.<listcomp>z7create_recovery_service_subnet got unknown kwargs: {!r}r>   rm   r-   rn   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   zIDatabaseRecoveryClient.create_recovery_service_subnet.<locals>.<dictcomp>r   rG   NRecoveryServiceSubnetr   rp   rr   )r!   Z&create_recovery_service_subnet_detailsr#   rP   rI   rJ   rN   rO   ra   rL   r   r$   r2   r%   rx     rs   z5DatabaseRecoveryClient.create_recovery_service_subnetc                    r  dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7dd|	dt
|	dt
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| || j |j| jj|||	||	d|||d	S | jj|||	||	d|||dS )a  
        Deletes a protected database based on the specified protected database ID.


        :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/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/DeleteProtectedDatabaser+   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zDDatabaseRecoveryClient.delete_protected_database.<locals>.<listcomp>z2delete_protected_database got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zDDatabaseRecoveryClient.delete_protected_database.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   )  rF   r   rG   r   rI   rJ   rK   rL   r   rN   rO   rP   rQ   r!   r`   r#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   r}     n   %$

z0DatabaseRecoveryClient.delete_protected_databasec                    rz   )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.
        rc   (/protectionPolicies/{protectionPolicyId}r|   delete_protection_policyzghttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/DeleteProtectionPolicyr+   c                    r.   r$   r$   r/   r2   r$   r%   r3   ~  r4   zCDatabaseRecoveryClient.delete_protection_policy.<locals>.<listcomp>z1delete_protection_policy got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zCDatabaseRecoveryClient.delete_protection_policy.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   r   r~   rQ   r!   re   r#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   r   K  sn   &$

z/DatabaseRecoveryClient.delete_protection_policyc                    rz   )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.
        rf   1/recoveryServiceSubnets/{recoveryServiceSubnetId}r|   delete_recovery_service_subnetzqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/DeleteRecoveryServiceSubnetr+   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zIDatabaseRecoveryClient.delete_recovery_service_subnet.<locals>.<listcomp>z7delete_recovery_service_subnet got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zIDatabaseRecoveryClient.delete_recovery_service_subnet.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   r   r~   rQ   r!   rh   r#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   r     r   z5DatabaseRecoveryClient.delete_recovery_service_subnetc                    s  dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7dd|	dt
|	dt
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| || j |j| jj|||	||	dd|	d|||dS | jj|||	||	dd|	d|||d
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)r   r   .fetch_protected_database_configuration_detailsr-   r,   c                    r.   r$   r$   r/   r2   r$   r%   r3   T  r4   zQDatabaseRecoveryClient.fetch_protected_database_configuration.<locals>.<listcomp>z?fetch_protected_database_configuration got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;   ]  r<   zQDatabaseRecoveryClient.fetch_protected_database_configuration.<locals>.<dictcomp>Nr   r=   r>   r-   r,   )r@   rA   rC   rB   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   i  rF   r   rG   r   streamr   )
rI   rJ   rK   rL   rM   rq   r   rN   rO   rP   rQ   r   r$   r2   r%   r     sv   ($

z=DatabaseRecoveryClient.fetch_protected_database_configurationc                    l  dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7dd|	dt
d}dd t |D }| jj|	d| jd}|du r|tj}|rt|tjs| j| || j |j| jj|||	|d|	d|||d
S | jj|||	|d|	d|||d	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(   r{   GETget_protected_databasezfhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/GetProtectedDatabaser   r   r-   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zADatabaseRecoveryClient.get_protected_database.<locals>.<listcomp>z/get_protected_database got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zADatabaseRecoveryClient.get_protected_database.<locals>.<dictcomp>Nr   r=   r>   r-   r@   rA   rC   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   ro   r   	rI   rJ   rK   rL   rq   r   rN   rO   rP   rQ   r   r$   r2   r%   r     p   $
z-DatabaseRecoveryClient.get_protected_databasec                    r   )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.
        rc   r   r   get_protection_policyzdhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/GetProtectionPolicyr   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   z@DatabaseRecoveryClient.get_protection_policy.<locals>.<listcomp>z.get_protection_policy got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;   $  r<   z@DatabaseRecoveryClient.get_protection_policy.<locals>.<dictcomp>Nr   r=   r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   /  rF   r   rG   rv   r   r   rQ   r   r$   r2   r%   r     r   z,DatabaseRecoveryClient.get_protection_policyc                    r   )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.
        rf   r   r   get_recovery_service_subnetznhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/GetRecoveryServiceSubnetr   c                    r.   r$   r$   r/   r2   r$   r%   r3   }  r4   zFDatabaseRecoveryClient.get_recovery_service_subnet.<locals>.<listcomp>z4get_recovery_service_subnet got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zFDatabaseRecoveryClient.get_recovery_service_subnet.<locals>.<dictcomp>Nr   r=   r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   ry   r   r   rQ   r   r$   r2   r%   r   S  r   z2DatabaseRecoveryClient.get_recovery_service_subnetc                    r   )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   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   z;DatabaseRecoveryClient.get_work_request.<locals>.<listcomp>z)get_work_request got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   z;DatabaseRecoveryClient.get_work_request.<locals>.<dictcomp>Nr   r=   r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   ZWorkRequestr   r   rQ   )r!   work_request_idr#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   r     r   z'DatabaseRecoveryClient.get_work_requestc                    s  dg}d}d}d}d}g d  fddt |D }|r$td	|d
|v r9g d}	|d
 |	vr9td|	d|v rNddg}
|d |
vrNtd|
d|v rcddg}|d |vrctd|||d
t|dt|dt|dt|dt|dt|dt|dt|dtd
}dd t |D }dd|dtd }d!d t |D }| jj|d"| j	d#}|d$u rt
j}|rt|t
js| j| || j |j| jj||||d%|d&|||d'
S | jj||||d%|d&|||d'	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", "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.
        compartmentIdrj   r   list_protected_databaseszrhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabaseCollection/ListProtectedDatabases)r   r   lifecycle_statedisplay_nameidre   rh   limitpage
sort_ordersort_byr-   c                    r.   r$   r$   r/   r2   r$   r%   r3   q  r4   zCDatabaseRecoveryClient.list_protected_databases.<locals>.<listcomp>z1list_protected_databases got unknown kwargs: {!r}r   ZCREATINGZUPDATINGZACTIVEZDELETINGZDELETEDFAILED7Invalid value for `lifecycle_state`, must be one of {0}r   ASCDESC2Invalid value for `sort_order`, must be one of {0}r   timeCreateddisplayName/Invalid value for `sort_by`, must be one of {0}r   r   re   rh   r   r   )
r   lifecycleStater   r   rc   rf   r   r   	sortOrdersortByc                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   zCDatabaseRecoveryClient.list_protected_databases.<locals>.<dictcomp>r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   NZProtectedDatabaseCollectionr   	rI   rJ   query_paramsrL   rq   r   rN   rO   rP   r   rR   rS   rT   r   r7   rU   r    rY   r   r   rZ   rV   r[   r\   r]   r   r^   r_   r!   compartment_idr#   rP   rI   rJ   rN   rO   ra   lifecycle_state_allowed_valuessort_order_allowed_valuessort_by_allowed_valuesr   rL   r   r$   r2   r%   r     s   E









z/DatabaseRecoveryClient.list_protected_databasesc                    s  dg}d}d}d}d}g d  fddt |D }|r$td	|d
|v r9g d}	|d
 |	vr9td|	d|v rNddg}
|d |
vrNtd|
d|v rcddg}|d |vrctd|d|v rxddg}|d |vrxtd|||d
t|dt|dt|dt|dt|dt|dt|dtd	}dd t |D }d d |d!td"}d#d t |D }| jj|d$| j	d%}|d&u rt
j}|rt|t
js| j| || j |j| jj||||d'|d(|||d)
S | jj||||d'|d(|||d)	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", "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   rt   r   list_protection_policieszqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicyCollection/ListProtectionPolicies)r   r   r   r   re   ownerr   r   r   r   r-   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zCDatabaseRecoveryClient.list_protection_policies.<locals>.<listcomp>z1list_protection_policies got unknown kwargs: {!r}r   r   r   r   ZoracleZcustomerz-Invalid value for `owner`, must be one of {0}r   r   r   r   r   r   r   r   r   re   r   r   )	r   r   r   rc   r   r   r   r   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   F  rF   zCDatabaseRecoveryClient.list_protection_policies.<locals>.<dictcomp>r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   M  rF   r   rG   NZProtectionPolicyCollectionr   r   r   )r!   r   r#   rP   rI   rJ   rN   rO   ra   r   Zowner_allowed_valuesr   r   r   rL   r   r$   r2   r%   r     s   D








z/DatabaseRecoveryClient.list_protection_policiesc                    s  dg}d}d}d}d}g d  fddt |D }|r$td	|d
|v r9g d}	|d
 |	vr9td|	d|v rNddg}
|d |
vrNtd|
d|v rcddg}|d |vrctd|||d
t|dt|dt|dt|dt|dt|dt|dtd	}dd t |D }dd|dtd}d d t |D }| jj|d!| j	d"}|d#u rt
j}|rt|t
js| j| || j |j| jj||||d$|d%|||d&
S | jj||||d$|d%|||d&	S )'a  
        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
              - DELETING
              - DELETED
              - FAILED

            Allowed values are: "CREATING", "UPDATING", "ACTIVE", "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   rw   r   list_recovery_service_subnetszzhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnetCollection/ListRecoveryServiceSubnets)r   r   r   r   r   vcn_idr   r   r   r   r-   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zHDatabaseRecoveryClient.list_recovery_service_subnets.<locals>.<listcomp>z6list_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   r   ZvcnIdr   r   r   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   zHDatabaseRecoveryClient.list_recovery_service_subnets.<locals>.<dictcomp>r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   NZRecoveryServiceSubnetCollectionr   r   r   r   r$   r2   r%   r   q  s   I








z4DatabaseRecoveryClient.list_recovery_service_subnetsc                      dg}d}d}d}d}g d  fddt |D }|r$td	|d|i}	d
d t |	D }	t |	D ]\}
}|du sMt|t jrTt| dkrTtd|
q7d|v ridg}|d |vritd|d|v r~ddg}|d |vr~td||	dt
|	dt
|	dt
|	dt
d}dd t |D }dd|	dt
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| || j |j| jj|||	||d |	d!|||d"S | jj|||	||d |	d!|||d"
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r   r   r-   r   r   r   r   c                    r.   r$   r$   r/   r2   r$   r%   r3   _  r4   zCDatabaseRecoveryClient.list_work_request_errors.<locals>.<listcomp>z1list_work_request_errors got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;   h  r<   zCDatabaseRecoveryClient.list_work_request_errors.<locals>.<dictcomp>Nr   r=   r   r   r   r   r   r   r   r   r   r   r   r   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   ZWorkRequestErrorCollectionr   
rI   rJ   rK   r   rL   rq   r   rN   rO   rP   rQ   r!   r   r#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   r   r   r   rL   r   r$   r2   r%   r        1	$




z/DatabaseRecoveryClient.list_work_request_errorsc                    r   )#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   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zADatabaseRecoveryClient.list_work_request_logs.<locals>.<listcomp>z/list_work_request_logs got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zADatabaseRecoveryClient.list_work_request_logs.<locals>.<dictcomp>Nr   r=   r   r   r   r   r   r   r   r   r   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   	  rF   r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   	  rF   r   rG   ZWorkRequestLogEntryCollectionr   r   rQ   r   r$   r2   r%   r     r   z-DatabaseRecoveryClient.list_work_request_logsc                    s  dg}d}d}d}d}g d  fddt |D }|r$td	|d
|v r9g d}	|d
 |	vr9td|	d|v rNddg}
|d |
vrNtd|
d|v rbdg}|d |vrbtd|||dt|d
t|dt|dt|dt|dt|dtd}dd t |D }dd|dtd}dd t |D }| jj|d| j	d }|d!u rt
j}|rt|t
js| j| || j |j| jj||||d"|d#|||d$
S | jj||||d"|d#|||d$	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", "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)
r   r   r   statusresource_idr-   r   r   r   r   c                    r.   r$   r$   r/   r2   r$   r%   r3   	  r4   z=DatabaseRecoveryClient.list_work_requests.<locals>.<listcomp>z+list_work_requests got unknown kwargs: {!r}r   )ZACCEPTEDZIN_PROGRESSr   Z	SUCCEEDEDZ	CANCELINGZCANCELEDz.Invalid value for `status`, must be one of {0}r   r   r   r   r   ZtimeAcceptedr   r   r   r   r   )r   r   r   Z
resourceIdr   r   r   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   	  rF   z=DatabaseRecoveryClient.list_work_requests.<locals>.<dictcomp>r>   r-   r   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   	  rF   r   rG   NZWorkRequestSummaryCollectionr   r   r   )r!   r   r#   rP   rI   rJ   rN   rO   ra   Zstatus_allowed_valuesr   r   r   rL   r   r$   r2   r%   r   @	  s   <








z)DatabaseRecoveryClient.list_work_requestsc                    r'   )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(   r{   PUTupdate_protected_databasezihttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/UpdateProtectedDatabaser+   c                    r.   r$   r$   r/   r2   r$   r%   r3   
  r4   zDDatabaseRecoveryClient.update_protected_database.<locals>.<listcomp>z2update_protected_database got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;   
  r<   zDDatabaseRecoveryClient.update_protected_database.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   (
  rF   r   rG   r   rH   rQ   )r!   r`   Z!update_protected_database_detailsr#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   r   	  rb   z0DatabaseRecoveryClient.update_protected_databasec                    r'   )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.
        rc   r   r   update_protection_policyzghttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectionPolicy/UpdateProtectionPolicyr+   c                    r.   r$   r$   r/   r2   r$   r%   r3   
  r4   zCDatabaseRecoveryClient.update_protection_policy.<locals>.<listcomp>z1update_protection_policy got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;   
  r<   zCDatabaseRecoveryClient.update_protection_policy.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;   
  rF   r   rG   r   rH   rQ   )r!   re   Z update_protection_policy_detailsr#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   r   L
  rb   z/DatabaseRecoveryClient.update_protection_policyc                    r'   )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.
        rf   r   r   update_recovery_service_subnetzqhttps://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/RecoveryServiceSubnet/UpdateRecoveryServiceSubnetr+   c                    r.   r$   r$   r/   r2   r$   r%   r3   
  r4   zIDatabaseRecoveryClient.update_recovery_service_subnet.<locals>.<listcomp>z7update_recovery_service_subnet got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;   
  r<   zIDatabaseRecoveryClient.update_recovery_service_subnet.<locals>.<dictcomp>Nr   r=   r>   r,   r-   r?   c                 S   rD   rE   r6   r8   r$   r$   r%   r;     rF   r   rG   r   rH   rQ   )r!   rh   Z&update_recovery_service_subnet_detailsr#   rP   rI   rJ   rN   rO   ra   rK   r9   r:   rL   r   r$   r2   r%   r   
  rb   z5DatabaseRecoveryClient.update_recovery_service_subnetN)__name__
__module____qualname____doc__r&   r*   rd   rg   rk   ru   rx   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r$   r$   r$   r%   r      s@    Xnnnbbbijiqbbbb , 0 .   nnr   N)
__future__r   Zoci._vendorr   r   ocir   r   Zoci.base_clientr   Z
oci.configr   r	   Z
oci.signerr
   Zoci.utilr   r   r   Zmodelsr   r7   objectr   r$   r$   r$   r%   <module>   s   