o
    ɶdɽ                     @   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   )dts_type_mappingZMissingc                   @   sX   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S )TransferApplianceClientz1
    Data Transfer Service API Specification
    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	/20171001z5https://datatransfer.{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transfer_appliance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$   Eusr/lib/python3.10/site-packages/oci/dts/transfer_appliance_client.py__init__   s>   3





z TransferApplianceClient.__init__c                    sz  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}|rt|tjs| j| | j| || j |j| jj|||	||	dd|	d|||dS | jj|||	||	dd|	d|||d
S )ax  
        Create a new Transfer Appliance


        :param str id: (required)
            ID of the Transfer Job

        :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 (e.g., if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            may be rejected).

        :param oci.dts.models.CreateTransferApplianceDetails create_transfer_appliance_details: (optional)
            Creates a New Transfer Appliance

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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.dts.models.TransferAppliance`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dts/create_transfer_appliance.py.html>`__ to see an example of how to use create_transfer_appliance API.
        id%/transferJobs/{id}/transferAppliancesPOSTcreate_transfer_appliance )r   r   opc_retry_token!create_transfer_appliance_detailsc                       g | ]}| vr|qS r$   r$   .0_keyZexpected_kwargsr$   r%   
<listcomp>       zETransferApplianceClient.create_transfer_appliance.<locals>.<listcomp>z2create_transfer_appliance got unknown kwargs: {!r}c                 S      i | ]\}}|t ur||qS r$   missingr0   kvr$   r$   r%   
<dictcomp>       zETransferApplianceClient.create_transfer_appliance.<locals>.<dictcomp>Nr   7Parameter {} cannot be None, whitespace or empty stringapplication/jsonr,   acceptcontent-typezopc-retry-tokenc                 S   &   i | ]\}}|t ur|d ur||qS Nr6   r8   r$   r$   r%   r;         & r   Zoperation_retry_strategyZclient_retry_strategyr-   TransferAppliancer   
resource_pathmethodpath_paramsheader_paramsbodyresponse_typer   operation_nameapi_reference_linkrequired_argumentsr   iterkeys
ValueErrorformat	iteritems
isinstancestring_typeslenstripr   r7   r    get_preferred_retry_strategyr   r   NoneRetryStrategyZadd_opc_retry_token_if_neededadd_opc_client_retries_headeradd_circuit_breaker_callbackr   make_retrying_callcall_api)r!   r'   r#   rP   rH   rI   rN   rO   extra_kwargsrJ   r9   r:   rK   r   r$   r2   r%   r*   r   sr   %$
z1TransferApplianceClient.create_transfer_appliancec                    sr  ddg}d}d}d}d}	g d  fdd	t |D }
|
r%td
|
||d}dd t |D }t |D ]\}}|du sOt|t jrVt| dkrVtd|q9dd|	dt
d}dd t |D }| jj|	d| jd}|rt|tjs| j| | j| || j |j| jj|||||d|	d||	|dS | jj|||||d|	d||	|d
S )a  
        Creates an X.509 certificate from a public key


        :param str id: (required)
            ID of the Transfer Job

        :param str transfer_appliance_label: (required)
            Label of the Transfer Appliance

        :param oci.dts.models.TransferAppliancePublicKey admin_public_key: (required)

        :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 (e.g., if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            may be rejected).

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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.dts.models.TransferApplianceCertificate`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dts/create_transfer_appliance_admin_credentials.py.html>`__ to see an example of how to use create_transfer_appliance_admin_credentials API.
        r'   transferApplianceLabelzP/transferJobs/{id}/transferAppliances/{transferApplianceLabel}/admin_credentialsr)   +create_transfer_appliance_admin_credentialsr+   r   r   r,   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zWTransferApplianceClient.create_transfer_appliance_admin_credentials.<locals>.<listcomp>zDcreate_transfer_appliance_admin_credentials got unknown kwargs: {!r}r'   ra   c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zWTransferApplianceClient.create_transfer_appliance_admin_credentials.<locals>.<dictcomp>Nr   r=   r>   r,   r?   c                 S   rB   rC   r6   r8   r$   r$   r%   r;   %  rD   r   rE   TransferApplianceCertificater   rG   rQ   )r!   r'   transfer_appliance_labelZadmin_public_keyr#   rP   rH   rI   rN   rO   r`   rJ   r9   r:   rK   r   r$   r2   r%   rb      st   '$
zCTransferApplianceClient.create_transfer_appliance_admin_credentialsc                    sj  ddg}d}d}d}d}g d  fdd	t |D }	|	r%td
|	||d}
dd t |
D }
t |
D ]\}}|du sOt|t jrVt| dkrVtd|q9dd|	dt
d}dd t |D }| jj|	d| jd}|rt|tjs| j| | j| || j |j| jj|||
||	d|||d	S | jj|||
||	d|||dS )a  
        deletes a transfer Appliance


        :param str id: (required)
            ID of the Transfer Job

        :param str transfer_appliance_label: (required)
            Label of the Transfer Appliance

        :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 (e.g., if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            may be rejected).

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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/dts/delete_transfer_appliance.py.html>`__ to see an example of how to use delete_transfer_appliance API.
        r'   ra   >/transferJobs/{id}/transferAppliances/{transferApplianceLabel}ZDELETEdelete_transfer_appliancer+   rc   c                    r.   r$   r$   r/   r2   r$   r%   r3   {  r4   zETransferApplianceClient.delete_transfer_appliance.<locals>.<listcomp>z2delete_transfer_appliance got unknown kwargs: {!r}rd   c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zETransferApplianceClient.delete_transfer_appliance.<locals>.<dictcomp>Nr   r=   r>   r,   r?   c                 S   rB   rC   r6   r8   r$   r$   r%   r;     rD   r   rE   r   )rH   rI   rJ   rK   r   rN   rO   rP   rQ   r!   r'   rf   r#   rP   rH   rI   rN   rO   r`   rJ   r9   r:   rK   r   r$   r2   r%   rh   J  sl   %$
z1TransferApplianceClient.delete_transfer_appliancec                    B  ddg}d}d}d}d}dg  fdd	t |D }	|	r$td
|	||d}
dd t |
D }
t |
D ]\}}|du sNt|t jrUt| dkrUtd|q8ddd}| j	j
|d| jd}|rt|tjs{| j	| || j |j| j	j|||
|d|d|||d
S | j	j|||
|d|d|||d	S )a]  
        Describes a transfer appliance in detail


        :param str id: (required)
            ID of the Transfer Job

        :param str transfer_appliance_label: (required)
            Label of the Transfer Appliance

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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.dts.models.TransferAppliance`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dts/get_transfer_appliance.py.html>`__ to see an example of how to use get_transfer_appliance API.
        r'   ra   rg   GETget_transfer_appliancer+   r   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zBTransferApplianceClient.get_transfer_appliance.<locals>.<listcomp>z/get_transfer_appliance got unknown kwargs: {!r}rd   c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zBTransferApplianceClient.get_transfer_appliance.<locals>.<dictcomp>Nr   r=   r>   r@   rA   rE   rF   r   	rH   rI   rJ   rK   rM   r   rN   rO   rP   r   rR   rS   rT   rU   rV   rW   rX   rY   r    rZ   r   r   r   r[   r\   r]   r   r^   r_   ri   r$   r2   r%   rl     j   $z.TransferApplianceClient.get_transfer_appliancec                    rj   )a  
        Gets the x.509 certificate for the Transfer Appliance's dedicated Certificate Authority (CA)


        :param str id: (required)
            ID of the Transfer Job

        :param str transfer_appliance_label: (required)
            Label of the Transfer Appliance

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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.dts.models.TransferApplianceCertificate`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dts/get_transfer_appliance_certificate_authority_certificate.py.html>`__ to see an example of how to use get_transfer_appliance_certificate_authority_certificate API.
        r'   ra   z`/transferJobs/{id}/transferAppliances/{transferApplianceLabel}/certificate_authority_certificaterk   8get_transfer_appliance_certificate_authority_certificater+   r   c                    r.   r$   r$   r/   r2   r$   r%   r3   0  r4   zdTransferApplianceClient.get_transfer_appliance_certificate_authority_certificate.<locals>.<listcomp>zQget_transfer_appliance_certificate_authority_certificate got unknown kwargs: {!r}rd   c                 S   r5   r$   r6   r8   r$   r$   r%   r;   :  r<   zdTransferApplianceClient.get_transfer_appliance_certificate_authority_certificate.<locals>.<dictcomp>Nr   r=   r>   rm   rE   re   r   rn   ro   ri   r$   r2   r%   rq     rp   zPTransferApplianceClient.get_transfer_appliance_certificate_authority_certificatec                    rj   )a  
        Describes a transfer appliance encryptionPassphrase in detail


        :param str id: (required)
            ID of the Transfer Job

        :param str transfer_appliance_label: (required)
            Label of the Transfer Appliance

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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.dts.models.TransferApplianceEncryptionPassphrase`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dts/get_transfer_appliance_encryption_passphrase.py.html>`__ to see an example of how to use get_transfer_appliance_encryption_passphrase API.
        r'   ra   zS/transferJobs/{id}/transferAppliances/{transferApplianceLabel}/encryptionPassphraserk   ,get_transfer_appliance_encryption_passphraser+   r   c                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zXTransferApplianceClient.get_transfer_appliance_encryption_passphrase.<locals>.<listcomp>zEget_transfer_appliance_encryption_passphrase got unknown kwargs: {!r}rd   c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zXTransferApplianceClient.get_transfer_appliance_encryption_passphrase.<locals>.<dictcomp>Nr   r=   r>   rm   rE   Z%TransferApplianceEncryptionPassphraser   rn   ro   ri   r$   r2   r%   rr   e  rp   zDTransferApplianceClient.get_transfer_appliance_encryption_passphrasec                    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|v rjg d}|d |vrjtd|d|	dt
i}dd t |D }ddd}| jj|	d| jd}|rt|tjs| j| || j |j| jj|||	||d|	d|||dS | jj|||	||d|	d|||d
S )a+  
        Lists Transfer Appliances associated with a transferJob


        :param str id: (required)
            ID of the Transfer Job

        :param str lifecycle_state: (optional)
            filtering by lifecycleState

            Allowed values are: "REQUESTED", "ORACLE_PREPARING", "SHIPPING", "DELIVERED", "PREPARING", "FINALIZED", "RETURN_LABEL_REQUESTED", "RETURN_LABEL_GENERATING", "RETURN_LABEL_AVAILABLE", "RETURN_DELAYED", "RETURN_SHIPPED", "RETURN_SHIPPED_CANCELLED", "ORACLE_RECEIVED", "ORACLE_RECEIVED_CANCELLED", "PROCESSING", "COMPLETE", "CUSTOMER_NEVER_RECEIVED", "ORACLE_NEVER_RECEIVED", "CUSTOMER_LOST", "CANCELLED", "DELETED", "REJECTED", "ERROR"

        :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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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.dts.models.MultipleTransferAppliances`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dts/list_transfer_appliances.py.html>`__ to see an example of how to use list_transfer_appliances API.
        r'   r(   rk   list_transfer_appliancesr+   )r   r   lifecycle_statec                    r.   r$   r$   r/   r2   r$   r%   r3     r4   zDTransferApplianceClient.list_transfer_appliances.<locals>.<listcomp>z1list_transfer_appliances got unknown kwargs: {!r}c                 S   r5   r$   r6   r8   r$   r$   r%   r;     r<   zDTransferApplianceClient.list_transfer_appliances.<locals>.<dictcomp>Nr   r=   rt   )Z	REQUESTEDZORACLE_PREPARINGZSHIPPINGZ	DELIVEREDZ	PREPARINGZ	FINALIZEDZRETURN_LABEL_REQUESTEDZRETURN_LABEL_GENERATINGZRETURN_LABEL_AVAILABLEZRETURN_DELAYEDZRETURN_SHIPPEDZRETURN_SHIPPED_CANCELLEDZORACLE_RECEIVEDZORACLE_RECEIVED_CANCELLEDZ
PROCESSINGZCOMPLETEZCUSTOMER_NEVER_RECEIVEDZORACLE_NEVER_RECEIVEDZCUSTOMER_LOSTZ	CANCELLEDZDELETEDZREJECTEDERRORz7Invalid value for `lifecycle_state`, must be one of {0}ZlifecycleStatec                 S   rB   rC   r6   r8   r$   r$   r%   r;     rD   r>   rm   r   rE   ZMultipleTransferAppliancesr   )
rH   rI   rJ   query_paramsrK   rM   r   rN   rO   rP   r   rR   rS   rT   rU   rV   rW   rX   rY   r   r7   r    rZ   r   r   r[   r\   r]   r   r^   r_   )r!   r'   r#   rP   rH   rI   rN   rO   r`   rJ   r9   r:   Zlifecycle_state_allowed_valuesrv   rK   r   r$   r2   r%   rs     s~    $z0TransferApplianceClient.list_transfer_appliancesc                    sf  ddg}d}d}d}d}	g d  fdd	t |D }
|
r%td
|
||d}dd t |D }t |D ]\}}|du sOt|t jrVt| dkrVtd|q9dd|	dt
d}dd t |D }| jj|	d| jd}|rt|tjs| j| || j |j| jj|||||d|	d||	|dS | jj|||||d|	d||	|d
S )a  
        Updates a Transfer Appliance


        :param str id: (required)
            ID of the Transfer Job

        :param str transfer_appliance_label: (required)
            Label of the Transfer Appliance

        :param oci.dts.models.UpdateTransferApplianceDetails update_transfer_appliance_details: (required)
            fields to update

        :param str if_match: (optional)
            The entity tag to match. Optional, if set, the update will be successful only if the
            object's tag matches the tag specified in 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 will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it.
            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.dts.models.TransferAppliance`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/dts/update_transfer_appliance.py.html>`__ to see an example of how to use update_transfer_appliance API.
        r'   ra   rg   ZPUTupdate_transfer_appliancer+   )r   r   if_matchc                    r.   r$   r$   r/   r2   r$   r%   r3   ^  r4   zETransferApplianceClient.update_transfer_appliance.<locals>.<listcomp>z2update_transfer_appliance got unknown kwargs: {!r}rd   c                 S   r5   r$   r6   r8   r$   r$   r%   r;   h  r<   zETransferApplianceClient.update_transfer_appliance.<locals>.<dictcomp>Nr   r=   r>   ry   )r@   rA   zif-matchc                 S   rB   rC   r6   r8   r$   r$   r%   r;   s  rD   r   rE   rF   r   rG   rw   )r!   r'   rf   Z!update_transfer_appliance_detailsr#   rP   rH   rI   rN   rO   r`   rJ   r9   r:   rK   r   r$   r2   r%   rx   -  sr   %$
z1TransferApplianceClient.update_transfer_applianceN)__name__
__module____qualname____doc__r&   r*   rb   rh   rl   rq   rr   rs   rx   r$   r$   r$   r%   r      s    XkmgZZZ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   