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   )oda_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&S )'	OdaClientzP
    API to create and maintain Oracle Digital Assistant service instances.
    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	/20190506z=https://digitalassistant-api.{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oda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$   6usr/lib/python3.10/site-packages/oci/oda/oda_client.py__init__   s>   3





zOdaClient.__init__c                    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t
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| | j| || j |j| jj|||
|||	d|||d
S | jj|||
|||	d|||d	S )av  
        Moves an Digital Assistant instance into a different compartment. When provided, If-Match is checked against
        ETag values of the resource.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param oci.oda.models.ChangeOdaInstanceCompartmentDetails change_oda_instance_compartment_details: (required)
            The compartment to which the Digital Assistant instance should be moved.

        :param str if_match: (optional)
            For optimistic concurrency control in a PUT or DELETE call for
            a Digital Assistant instance, set the `if-match` query parameter
            to the value of the `ETAG` header from a previous GET or POST
            response for that instance. The service updates or deletes the
            instance only if the etag that you provide matches the instance's
            current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so that you can retry the request if there's
            a timeout or server error without the risk of executing that same action again.

            Retry tokens expire after 24 hours, but they can become invalid before then if there are
            conflicting operations. For example, if an instance was deleted and purged from the system,
            then the service might reject a retry of the original creation 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/oda/change_oda_instance_compartment.py.html>`__ to see an example of how to use change_oda_instance_compartment API.
        odaInstanceIdz7/odaInstances/{odaInstanceId}/actions/changeCompartmentPOSTchange_oda_instance_compartmentzihttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstance/ChangeOdaInstanceCompartment)r   r   if_matchopc_request_idopc_retry_tokenc                       g | ]}| vr|qS r$   r$   .0_keyZexpected_kwargsr$   r%   
<listcomp>       z=OdaClient.change_oda_instance_compartment.<locals>.<listcomp>z8change_oda_instance_compartment got unknown kwargs: {!r}c                 S      i | ]\}}|t ur||qS r$   missingr/   kvr$   r$   r%   
<dictcomp>       z=OdaClient.change_oda_instance_compartment.<locals>.<dictcomp>Nr   7Parameter {} cannot be None, whitespace or empty stringapplication/jsonr*   r+   r,   )acceptcontent-typeif-matchopc-request-idopc-retry-tokenc                 S   &   i | ]\}}|t ur|d ur||qS Nr5   r7   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
isinstancestring_typeslenstripr   r6   r    get_preferred_retry_strategyr   r   DEFAULT_RETRY_STRATEGYNoneRetryStrategyadd_opc_retry_token_if_neededadd_opc_client_retries_headeradd_circuit_breaker_callbackr   make_retrying_callcall_api)r!   oda_instance_idZ'change_oda_instance_compartment_detailsr#   rO   rH   rI   rM   rN   extra_kwargsrJ   r8   r9   rK   r   r$   r1   r%   r)   r   sv   2$


z)OdaClient.change_oda_instance_compartmentc                    s  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 )aq	  
        Starts an asynchronous job to create a Digital Assistant instance.

        To monitor the status of the job, take the `opc-work-request-id` response
        header value and use it to call `GET /workRequests/{workRequestId}`.


        :param oci.oda.models.CreateOdaInstanceDetails create_oda_instance_details: (required)
            Details for the new Digital Assistant instance.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so that you can retry the request if there's
            a timeout or server error without the risk of executing that same action again.

            Retry tokens expire after 24 hours, but they can become invalid before then if there are
            conflicting operations. For example, if an instance was deleted and purged from the system,
            then the service might reject a retry of the original creation 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.oda.models.OdaInstance`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/create_oda_instance.py.html>`__ to see an example of how to use create_oda_instance API.
        /odaInstancesr(   create_oda_instance r   r   r+   r,   c                    r-   r$   r$   r.   r1   r$   r%   r2   #  r3   z1OdaClient.create_oda_instance.<locals>.<listcomp>z,create_oda_instance got unknown kwargs: {!r}r=   r+   r,   r>   r?   rA   rB   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   .  rE   z1OdaClient.create_oda_instance.<locals>.<dictcomp>r   rF   NOdaInstancer   )	rH   rI   rK   rL   response_typer   rM   rN   rO   )r   rQ   rR   rS   r   r6   rT   r    rY   r   r   rZ   rU   r[   r\   r]   r^   r   r_   r`   )r!   Zcreate_oda_instance_detailsr#   rO   rH   rI   rM   rN   rb   rK   r   r$   r1   r%   rd      sf   )

zOdaClient.create_oda_instancec                    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j|||
|||	d|||d
S | jj|||
|||	d|||d	S )a	  
        Starts an asynchronous job to create a Digital Assistant instance attachment.

        To monitor the status of the job, take the `opc-work-request-id` response
        header value and use it to call `GET /workRequests/{workRequestId}`.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param oci.oda.models.CreateOdaInstanceAttachmentDetails create_oda_instance_attachment_details: (required)
            Details for the new Digital Assistant instance attachment.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so that you can retry the request if there's
            a timeout or server error without the risk of executing that same action again.

            Retry tokens expire after 24 hours, but they can become invalid before then if there are
            conflicting operations. For example, if an instance was deleted and purged from the system,
            then the service might reject a retry of the original creation 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/oda/create_oda_instance_attachment.py.html>`__ to see an example of how to use create_oda_instance_attachment API.
        r'   )/odaInstances/{odaInstanceId}/attachmentsr(   create_oda_instance_attachmentzrhttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstanceAttachment/CreateOdaInstanceAttachmentrf   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z<OdaClient.create_oda_instance_attachment.<locals>.<listcomp>z7create_oda_instance_attachment got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z<OdaClient.create_oda_instance_attachment.<locals>.<dictcomp>Nr   r<   r=   r+   r,   rg   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   r   rG   rP   )r!   ra   Z&create_oda_instance_attachment_detailsr#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rK   r   r$   r1   r%   rk   S  st   ,$

z(OdaClient.create_oda_instance_attachmentc                    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t
i}dd t |D }d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 )al	  
        Starts an asynchronous job to delete the specified Digital Assistant instance.
        To monitor the status of the job, take the `opc-work-request-id` response header value and use it to call `GET /workRequests/{workRequestId}`.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param int retention_time: (optional)
            Retain the ODA instance being deleted for the given number of days before hard-delete/purge.

        :param str if_match: (optional)
            For optimistic concurrency control in a PUT or DELETE call for
            a Digital Assistant instance, set the `if-match` query parameter
            to the value of the `ETAG` header from a previous GET or POST
            response for that instance. The service updates or deletes the
            instance only if the etag that you provide matches the instance's
            current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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/oda/delete_oda_instance.py.html>`__ to see an example of how to use delete_oda_instance API.
        r'   /odaInstances/{odaInstanceId}DELETEdelete_oda_instancez^https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstance/DeleteOdaInstance)r   r   retention_timer*   r+   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z1OdaClient.delete_oda_instance.<locals>.<listcomp>z,delete_oda_instance got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z1OdaClient.delete_oda_instance.<locals>.<dictcomp>Nr   r<   ZretentionTimero   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r=   r*   r+   r>   r?   r@   rA   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   r   )	rH   rI   rJ   query_paramsrK   r   rM   rN   rO   r   rQ   rR   rS   rT   rU   rV   rW   rX   r   r6   r    rY   r   r   rZ   r[   r]   r^   r   r_   r`   )r!   ra   r#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rq   rK   r   r$   r1   r%   rn     sx   *$

zOdaClient.delete_oda_instancec                    sv  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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  
        Starts an asynchronous job to delete the specified Digital Assistant instance attachment.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param str attachment_id: (required)
            Unique Digital Assistant instance attachment identifier.

        :param str if_match: (optional)
            For optimistic concurrency control in a PUT or DELETE call for
            a Digital Assistant instance, set the `if-match` query parameter
            to the value of the `ETAG` header from a previous GET or POST
            response for that instance. The service updates or deletes the
            instance only if the etag that you provide matches the instance's
            current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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/oda/delete_oda_instance_attachment.py.html>`__ to see an example of how to use delete_oda_instance_attachment API.
        r'   attachmentId8/odaInstances/{odaInstanceId}/attachments/{attachmentId}rm   delete_oda_instance_attachmentzrhttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstanceAttachment/DeleteOdaInstanceAttachmentr   r   r*   r+   c                    r-   r$   r$   r.   r1   r$   r%   r2   r  r3   z<OdaClient.delete_oda_instance_attachment.<locals>.<listcomp>z7delete_oda_instance_attachment got unknown kwargs: {!r}r'   rs   c                 S   r4   r$   r5   r7   r$   r$   r%   r:   |  r;   z<OdaClient.delete_oda_instance_attachment.<locals>.<dictcomp>Nr   r<   r=   r*   r+   rp   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   r   rH   rI   rJ   rK   r   rM   rN   rO   rr   )r!   ra   attachment_idr#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rK   r   r$   r1   r%   ru   <  sp   )$

z(OdaClient.delete_oda_instance_attachmentc                    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 )as  
        Gets the specified Digital Assistant instance.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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.oda.models.OdaInstance`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_oda_instance.py.html>`__ to see an example of how to use get_oda_instance API.
        r'   rl   GETget_oda_instancez[https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstance/GetOdaInstancer   r   r+   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z.OdaClient.get_oda_instance.<locals>.<listcomp>z)get_oda_instance got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z.OdaClient.get_oda_instance.<locals>.<dictcomp>Nr   r<   r=   r+   r>   r?   rA   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   rh   r   	rH   rI   rJ   rK   ri   r   rM   rN   rO   rr   r!   ra   r#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rK   r   r$   r1   r%   r|     sp   $
zOdaClient.get_oda_instancec                    s  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t
i}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 an ODA instance attachment by identifier


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param str attachment_id: (required)
            Unique Digital Assistant instance attachment identifier.

        :param bool include_owner_metadata: (optional)
            Whether to send attachment owner info during get/list call.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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.oda.models.OdaInstanceAttachment`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_oda_instance_attachment.py.html>`__ to see an example of how to use get_oda_instance_attachment API.
        r'   rs   rt   r{   get_oda_instance_attachmentzohttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstanceAttachment/GetOdaInstanceAttachment)r   r   include_owner_metadatar+   c                    r-   r$   r$   r.   r1   r$   r%   r2   =  r3   z9OdaClient.get_oda_instance_attachment.<locals>.<listcomp>z4get_oda_instance_attachment got unknown kwargs: {!r}rw   c                 S   r4   r$   r5   r7   r$   r$   r%   r:   G  r;   z9OdaClient.get_oda_instance_attachment.<locals>.<dictcomp>Nr   r<   includeOwnerMetadatar   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   P  rE   r=   r+   r~   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   W  rE   r   rF   ZOdaInstanceAttachmentr   
rH   rI   rJ   rq   rK   ri   r   rM   rN   rO   rr   )r!   ra   ry   r#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rq   rK   r   r$   r1   r%   r     s|   $$
z%OdaClient.get_oda_instance_attachmentc                    rz   )a"  
        Gets information about the work request with the specified ID, including its status.

        You can use this operation to monitor the status of jobs that you
        requested to create, delete, and update instances.


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

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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.oda.models.WorkRequest`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
        workRequestIdz/workRequests/{workRequestId}r{   get_work_requestz[https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/WorkRequest/GetWorkRequestr}   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z.OdaClient.get_work_request.<locals>.<listcomp>z)get_work_request got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z.OdaClient.get_work_request.<locals>.<dictcomp>Nr   r<   r=   r+   r~   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   ZWorkRequestr   r   rr   )r!   work_request_idr#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rK   r   r$   r1   r%   r   }  sp   !$
zOdaClient.get_work_requestc                    sD  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|v rddg}|d |vrtd|d|v rdg}|d |vrtd||	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}|rt|tjs| j| || j |j| jj|||	||d$|	d%|||d&S | jj|||	||d$|	d%|||d&
S )'aB  
        Returns a list of ODA instance attachments


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param bool include_owner_metadata: (optional)
            Whether to send attachment owner info during get/list call.

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

        :param str page: (optional)
            The page at which to start retrieving results.

            You get this value from the `opc-next-page` header in a previous list request.
            To retireve the first page, omit this query parameter.

            Example: `MToxMA==`

        :param str lifecycle_state: (optional)
            List only the ODA instance attachments that are in this lifecycle state.

            Allowed values are: "ATTACHING", "ACTIVE", "DETACHING", "INACTIVE", "FAILED"

        :param str sort_order: (optional)
            Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending).

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            Sort on this field. You can specify one sort order only. The default sort field is `TIMECREATED`.
            The default sort order for `TIMECREATED` is descending.

            Allowed values are: "TIMECREATED"

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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.oda.models.OdaInstanceAttachmentCollection`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_oda_instance_attachments.py.html>`__ to see an example of how to use list_oda_instance_attachments API.
        r'   rj   r{   list_oda_instance_attachmentsz{https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstanceAttachmentCollection/ListOdaInstanceAttachments)	r   r   r   limitpagelifecycle_state
sort_ordersort_byr+   c                    r-   r$   r$   r.   r1   r$   r%   r2   0  r3   z;OdaClient.list_oda_instance_attachments.<locals>.<listcomp>z6list_oda_instance_attachments got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:   9  r;   z;OdaClient.list_oda_instance_attachments.<locals>.<dictcomp>Nr   r<   r   )Z	ATTACHINGACTIVEZ	DETACHINGINACTIVEFAILED7Invalid value for `lifecycle_state`, must be one of {0}r   ASCDESC2Invalid value for `sort_order`, must be one of {0}r   TIMECREATED/Invalid value for `sort_by`, must be one of {0}r   r   r   )r   r   r   lifecycleState	sortOrdersortByc                 S   rC   rD   r5   r7   r$   r$   r%   r:   \  rE   r=   r+   r~   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   c  rE   r   rF   ZOdaInstanceAttachmentCollectionr   r   rr   )r!   ra   r#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   lifecycle_state_allowed_valuessort_order_allowed_valuessort_by_allowed_valuesrq   rK   r   r$   r1   r%   r     s   <$






z'OdaClient.list_oda_instance_attachmentsc                    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}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 page of Digital Assistant instances that belong to the specified
        compartment.

        If the `opc-next-page` header appears in the response, then
        there are more items to retrieve. To get the next page in the subsequent
        GET request, include the header's value as the `page` query parameter.


        :param str compartment_id: (required)
            List the Digital Assistant instances that belong to this compartment.

        :param str display_name: (optional)
            List only the information for the Digital Assistant instance with this user-friendly name. These names don't have to be unique and may change.

            Example: `My new resource`

        :param str lifecycle_state: (optional)
            List only the Digital Assistant instances that are in this lifecycle state.

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

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

        :param str page: (optional)
            The page at which to start retrieving results.

            You get this value from the `opc-next-page` header in a previous list request.
            To retireve the first page, omit this query parameter.

            Example: `MToxMA==`

        :param str sort_order: (optional)
            Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending).

            Allowed values are: "ASC", "DESC"

        :param str sort_by: (optional)
            Sort on this field. You can specify one sort order only. The default sort field is `TIMECREATED`.

            The default sort order for `TIMECREATED` is descending, and the default sort order for `DISPLAYNAME` is ascending.

            Allowed values are: "TIMECREATED", "DISPLAYNAME"

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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 list of :class:`~oci.oda.models.OdaInstanceSummary`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_oda_instances.py.html>`__ to see an example of how to use list_oda_instances API.
        compartmentIdrc   r{   list_oda_instanceszdhttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstanceSummary/ListOdaInstances)	r   r   display_namer   r   r   r   r   r+   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z0OdaClient.list_oda_instances.<locals>.<listcomp>z+list_oda_instances got unknown kwargs: {!r}r   )ZCREATINGZUPDATINGr   r   ZDELETINGZDELETEDr   r   r   r   r   r   r   r   ZDISPLAYNAMEr   r   r   r   )r   ZdisplayNamer   r   r   r   r   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   z0OdaClient.list_oda_instances.<locals>.<dictcomp>r=   r+   r~   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   	  rE   r   rF   Nzlist[OdaInstanceSummary]r   	rH   rI   rq   rK   ri   r   rM   rN   rO   r   rQ   rR   rS   r   r6   rT   r    rY   r   r   rZ   rU   r[   r]   r^   r   r_   r`   )r!   compartment_idr#   rO   rH   rI   rM   rN   rb   r   r   r   rq   rK   r   r$   r1   r%   r     s   D





	
zOdaClient.list_oda_instancesc                      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 rjddg}|d |vrjt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
  
        Returns a page of errors for the specified work request.

        If the `opc-next-page` header appears in the response, then
        there are more items to retrieve. To get the next page in the subsequent
        GET request, include the header's value as the `page` query parameter.


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

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str page: (optional)
            The page at which to start retrieving results.

            You get this value from the `opc-next-page` header in a previous list request.
            To retireve the first page, omit this query parameter.

            Example: `MToxMA==`

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

        :param str sort_by: (optional)
            The field to sort by. You can specify only one sort order. If no value is specified, then the default is `TIMESTAMP`.

            The default sort order for both `TIMESTAMP` and `CODE` is ascending.

            Allowed values are: "CODE", "TIMESTAMP"

        :param str sort_order: (optional)
            Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending).

            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 list of :class:`~oci.oda.models.WorkRequestError`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/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_errorszghttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/WorkRequestError/ListWorkRequestErrorsr   r   r+   r   r   r   r   c                    r-   r$   r$   r.   r1   r$   r%   r2   v  r3   z6OdaClient.list_work_request_errors.<locals>.<listcomp>z1list_work_request_errors got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z6OdaClient.list_work_request_errors.<locals>.<dictcomp>Nr   r<   r   ZCODE	TIMESTAMPr   r   r   r   r   r   r   r   r   r   r   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r=   r+   r~   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   zlist[WorkRequestError]r   r   rr   r!   r   r#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   r   r   rq   rK   r   r$   r1   r%   r   -     9	$




z"OdaClient.list_work_request_errorsc                    r   )$a
  
        Returns a page of of log messages for a given work request.

        If the `opc-next-page` header appears in the response, then
        there are more items to retrieve. To get the next page in the subsequent
        GET request, include the header's value as the `page` query parameter.


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

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str page: (optional)
            The page at which to start retrieving results.

            You get this value from the `opc-next-page` header in a previous list request.
            To retireve the first page, omit this query parameter.

            Example: `MToxMA==`

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

        :param str sort_by: (optional)
            The field to sort by. You can specify only one sort order. If no value is specified, then the default is `TIMESTAMP`.

            The default sort order for both `TIMESTAMP` and `MESSAGE` is ascending.

            Allowed values are: "MESSAGE", "TIMESTAMP"

        :param str sort_order: (optional)
            Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending).

            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 list of :class:`~oci.oda.models.WorkRequestLogEntry`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/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_logszhhttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/WorkRequestLogEntry/ListWorkRequestLogsr   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z4OdaClient.list_work_request_logs.<locals>.<listcomp>z/list_work_request_logs got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z4OdaClient.list_work_request_logs.<locals>.<dictcomp>Nr   r<   r   MESSAGEr   r   r   r   r   r   r   r   r   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   2  rE   r=   r+   r~   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   9  rE   r   rF   zlist[WorkRequestLogEntry]r   r   rr   r   r$   r1   r%   r     r   z OdaClient.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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 )"ag  
        Returns a page of work requests for the specified compartment.

        If the `opc-next-page` header appears in the response, then
        there are more items to retrieve. To get the next page in the subsequent
        GET request, include the header's value as the `page` query parameter.


        :param str compartment_id: (required)
            List the Digital Assistant instances that belong to this compartment.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str oda_instance_id: (optional)
            List only the information for this Digital Assistant instance.

        :param str resource_id: (optional)
            List only the information for this resource.

        :param str page: (optional)
            The page at which to start retrieving results.

            You get this value from the `opc-next-page` header in a previous list request.
            To retireve the first page, omit this query parameter.

            Example: `MToxMA==`

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

        :param str sort_by: (optional)
            The field to sort by. You can specify only one sort order. If no value is specified, then the default is `TIME_ACCEPTED`.

            The default sort order for the time fields is descending. The default order for `DISPLAYNAME` and `STATUS` is ascending.default: TIME_ACCEPTED

            Allowed values are: "OPERATION_TYPE", "STATUS", "TIME_ACCEPTED", "TIME_STARTED", "TIME_FINISHED"

        :param str sort_order: (optional)
            Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending).

            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 list of :class:`~oci.oda.models.WorkRequestSummary`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
        r   z/workRequestsr{   list_work_requestsz]https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/WorkRequest/ListWorkRequests)	r   r   r+   ra   resource_idr   r   r   r   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z0OdaClient.list_work_requests.<locals>.<listcomp>z+list_work_requests got unknown kwargs: {!r}r   )ZOPERATION_TYPEZSTATUSZTIME_ACCEPTEDZTIME_STARTEDZTIME_FINISHEDr   r   r   r   r   ra   r   r   r   )r   r'   Z
resourceIdr   r   r   r   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   z0OdaClient.list_work_requests.<locals>.<dictcomp>r=   r+   r~   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   Nzlist[WorkRequestSummary]r   r   r   )r!   r   r#   rO   rH   rI   rM   rN   rb   r   r   rq   rK   r   r$   r1   r%   r   _  s   ?





	
zOdaClient.list_work_requestsc                      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t
d}dd t |D }| jj|	d| jd}|du rtj}|rt|tjs| j| | j| || j |j| jj|||	||	d|||d	S | jj|||	||	d|||dS )a
  
        Starts an inactive Digital Assistant instance. Once active, the instance will be accessible and metering
        of requests will be started again.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str if_match: (optional)
            For optimistic concurrency control in a PUT or DELETE call for
            a Digital Assistant instance, set the `if-match` query parameter
            to the value of the `ETAG` header from a previous GET or POST
            response for that instance. The service updates or deletes the
            instance only if the etag that you provide matches the instance's
            current etag value.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so that you can retry the request if there's
            a timeout or server error without the risk of executing that same action again.

            Retry tokens expire after 24 hours, but they can become invalid before then if there are
            conflicting operations. For example, if an instance was deleted and purged from the system,
            then the service might reject a retry of the original creation 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/oda/start_oda_instance.py.html>`__ to see an example of how to use start_oda_instance API.
        r'   z+/odaInstances/{odaInstanceId}/actions/startr(   start_oda_instancez]https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstance/StartOdaInstancer   r   r+   r*   r,   c                    r-   r$   r$   r.   r1   r$   r%   r2   4  r3   z0OdaClient.start_oda_instance.<locals>.<listcomp>z+start_oda_instance got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:   =  r;   z0OdaClient.start_oda_instance.<locals>.<dictcomp>Nr   r<   r=   r+   r*   r,   r>   r?   rA   r@   rB   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   J  rE   r   rF   r   rx   rP   r   r$   r1   r%   r     sr   /$


zOdaClient.start_oda_instancec                    r   )a
  
        Stops an active Digital Assistant instance. Once inactive, the instance will not be accessible and metering
        of requests will be stopped until the instance is started again. Data associated with the instance
        is not affected.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :param str if_match: (optional)
            For optimistic concurrency control in a PUT or DELETE call for
            a Digital Assistant instance, set the `if-match` query parameter
            to the value of the `ETAG` header from a previous GET or POST
            response for that instance. The service updates or deletes the
            instance only if the etag that you provide matches the instance's
            current etag value.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so that you can retry the request if there's
            a timeout or server error without the risk of executing that same action again.

            Retry tokens expire after 24 hours, but they can become invalid before then if there are
            conflicting operations. For example, if an instance was deleted and purged from the system,
            then the service might reject a retry of the original creation 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/oda/stop_oda_instance.py.html>`__ to see an example of how to use stop_oda_instance API.
        r'   z*/odaInstances/{odaInstanceId}/actions/stopr(   stop_oda_instancez\https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstance/StopOdaInstancer   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z/OdaClient.stop_oda_instance.<locals>.<listcomp>z*stop_oda_instance got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z/OdaClient.stop_oda_instance.<locals>.<dictcomp>Nr   r<   r=   r+   r*   r,   r   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   r   rx   rP   r   r$   r1   r%   r   m  sr   0$


zOdaClient.stop_oda_instancec                    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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  
        Updates the specified Digital Assistant instance with the information in the request body.


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param oci.oda.models.UpdateOdaInstanceDetails update_oda_instance_details: (required)
            The information to update.

        :param str if_match: (optional)
            For optimistic concurrency control in a PUT or DELETE call for
            a Digital Assistant instance, set the `if-match` query parameter
            to the value of the `ETAG` header from a previous GET or POST
            response for that instance. The service updates or deletes the
            instance only if the etag that you provide matches the instance's
            current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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.oda.models.OdaInstance`
        :rtype: :class:`~oci.response.Response`

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/oda/update_oda_instance.py.html>`__ to see an example of how to use update_oda_instance API.
        r'   rl   PUTupdate_oda_instancez^https://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstance/UpdateOdaInstancerv   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z1OdaClient.update_oda_instance.<locals>.<listcomp>z,update_oda_instance got unknown kwargs: {!r}c                 S   r4   r$   r5   r7   r$   r$   r%   r:   #  r;   z1OdaClient.update_oda_instance.<locals>.<dictcomp>Nr   r<   r=   r*   r+   rp   c                 S   rC   rD   r5   r7   r$   r$   r%   r:   /  rE   r   rF   rh   r   )
rH   rI   rJ   rK   rL   ri   r   rM   rN   rO   rr   )r!   ra   Zupdate_oda_instance_detailsr#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rK   r   r$   r1   r%   r     sv   )$

zOdaClient.update_oda_instancec                    sz  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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;	  
        Updates the ODA instance attachment


        :param str oda_instance_id: (required)
            Unique Digital Assistant instance identifier.

        :param str attachment_id: (required)
            Unique Digital Assistant instance attachment identifier.

        :param oci.oda.models.UpdateOdaInstanceAttachmentDetails update_oda_instance_attachment_details: (required)
            The information to be updated.

        :param str if_match: (optional)
            For optimistic concurrency control in a PUT or DELETE call for
            a Digital Assistant instance, set the `if-match` query parameter
            to the value of the `ETAG` header from a previous GET or POST
            response for that instance. The service updates or deletes the
            instance only if the etag that you provide matches the instance's
            current etag value.

        :param str opc_request_id: (optional)
            The client request ID for tracing. This value is included in the opc-request-id response header.

        :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/oda/update_oda_instance_attachment.py.html>`__ to see an example of how to use update_oda_instance_attachment API.
        r'   rs   rt   r   update_oda_instance_attachmentzrhttps://docs.oracle.com/iaas/api/#/en/digital-assistant/20190506/OdaInstanceAttachment/UpdateOdaInstanceAttachmentrv   c                    r-   r$   r$   r.   r1   r$   r%   r2     r3   z<OdaClient.update_oda_instance_attachment.<locals>.<listcomp>z7update_oda_instance_attachment got unknown kwargs: {!r}rw   c                 S   r4   r$   r5   r7   r$   r$   r%   r:     r;   z<OdaClient.update_oda_instance_attachment.<locals>.<dictcomp>Nr   r<   r=   r*   r+   rp   c                 S   rC   rD   r5   r7   r$   r$   r%   r:     rE   r   rF   r   rG   rr   )r!   ra   ry   Z&update_oda_instance_attachment_detailsr#   rO   rH   rI   rM   rN   rb   rJ   r8   r9   rK   r   r$   r1   r%   r   U  st   ,$

z(OdaClient.update_oda_instance_attachmentN)__name__
__module____qualname____doc__r&   r)   rd   rk   rn   ru   r|   r   r   r   r   r   r   r   r   r   r   r   r$   r$   r$   r%   r      s2    X{fsvnbqe ( %   vwqr   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   r6   objectr   r$   r$   r$   r%   <module>   s   