
                            S SK Jr  S SKrS SKrS SKJrJrJrJrJ	r	J
r
JrJrJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S S	KJr  S S
KJr  S SKJr   \\R@                  \RB                  RD                  4   r#S SK&J'r'  S SK&J(r(  S SK)J*r*  S SK)J+r+  S SK,J-r-  S SK.J/r/  S SK.J0r0  SSK1J2r2J3r3  SSK4J5r5  SSK6J7r7   " S S5      r8\Rr                  Ru                  \Rv                  S9r3Sr<g! \$ a    \\R@                  \%4   r# Nf = f)    )OrderedDictN)	DictMappingMutableMappingMutableSequenceOptionalSequenceTupleTypeUnion)gapic_version)ClientOptions)
exceptions)gapic_v1)retry)timeout)credentials)service_account)iam_policy_pb2)
policy_pb2)duration_pb2)field_mask_pb2)pagers)pubsub)TimeoutType   )PublisherTransportDEFAULT_CLIENT_INFO)PublisherGrpcAsyncIOTransport)PublisherClientc                      \ rS rSr% Sr\\S'   \R                  r\R                  r\	" \R                  5      r
\	" \R                  5      r\	" \R                  5      r\	" \R                  5      r\	" \R                  5      r\	" \R                  5      r\	" \R                   5      r\	" \R"                  5      r\	" \R$                  5      r\	" \R&                  5      r\	" \R(                  5      r\	" \R*                  5      r\	" \R,                  5      r\	" \R.                  5      r\	" \R0                  5      r\	" \R2                  5      r\S\4S j5       r\S\4S j5       r\r\ S2S	\ \!   4S
 jj5       r"\#S\$4S j5       r%\&RN                  " \(" \5      RR                  \(" \5      5      r)SSS\*S.S\ \+RX                     S\-\\$4   S	\ \!   S\.R^                  R`                  SS4
S jjr1 S2S\.Rd                  Rf                  \.Rd                  Rf                  SS.S\ \-\4Rj                  \4      S\ \   S\6S\7S\8\9\\4      S\4Rj                  4S jjjr: S2SS\.Rd                  Rf                  \.Rd                  Rf                  SS.S\ \-\4Rv                  \4      S\ \4Rj                     S\ \<Rz                     S\6S\7S\8\9\\4      S\4Rj                  4S jjjr> S2SS\.Rd                  Rf                  \.Rd                  Rf                  SS.S\ \-\4R~                  \4      S\ \   S \ \@\4R                        S\6S\7S\8\9\\4      S\4R                  4S! jjjrC S2S\.Rd                  Rf                  \.Rd                  Rf                  SS".S\ \-\4R                  \4      S\ \   S\6S\7S\8\9\\4      S\4Rj                  4S# jjjrE S2S\.Rd                  Rf                  \.Rd                  Rf                  SS$.S\ \-\4R                  \4      S%\ \   S\6S\7S\8\9\\4      S\GR                  4S& jjjrI S2S\.Rd                  Rf                  \.Rd                  Rf                  SS".S\ \-\4R                  \4      S\ \   S\6S\7S\8\9\\4      S\GR                  4S' jjjrL S2S\.Rd                  Rf                  \.Rd                  Rf                  SS".S\ \-\4R                  \4      S\ \   S\6S\7S\8\9\\4      S\GR                  4S( jjjrO S2S\.Rd                  Rf                  \.Rd                  Rf                  SS".S\ \-\4R                  \4      S\ \   S\6S\7S\8\9\\4      SS4S) jjjrQ S2\.Rd                  Rf                  \.Rd                  Rf                  SS*.S\ \-\4R                  \4      S\6S\7S\8\9\\4      S\4R                  4
S+ jjjrT S2\.Rd                  Rf                  \.Rd                  Rf                  SS*.S\ \UR                     S\6S\7S\8\9\\4      S\WR                  4
S, jjjrY S2\.Rd                  Rf                  \.Rd                  Rf                  SS*.S\ \UR                     S\6S\7S\8\9\\4      S\WR                  4
S- jjjr[ S2\.Rd                  Rf                  \.Rd                  Rf                  SS*.S\ \UR                     S\6S\7S\8\9\\4      S\UR                  4
S. jjjr^S3S/ jr_S0 r`S1rag)4PublisherAsyncClient:   z\The service that an application uses to manipulate topics,
and to send messages to a topic.
_clientinfoc                 T    [         R                  R                  " [        U/UQ70 UD6$ )a>  Creates an instance of this client using the provided credentials
    info.

Args:
    info (dict): The service account private key info.
    args: Additional arguments to pass to the constructor.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    PublisherAsyncClient: The constructed client.
)r    from_service_account_info__func__r"   )clsr%   argskwargss       Clib/third_party/google/pubsub_v1/services/publisher/async_client.pyr'   .PublisherAsyncClient.from_service_account_info]   s+     88AABVX\n_cngmnn    filenamec                 T    [         R                  R                  " [        U/UQ70 UD6$ )aZ  Creates an instance of this client using the provided credentials
    file.

Args:
    filename (str): The path to the service account private key json
        file.
    args: Additional arguments to pass to the constructor.
    kwargs: Additional arguments to pass to the constructor.

Returns:
    PublisherAsyncClient: The constructed client.
)r    from_service_account_filer(   r"   )r)   r/   r*   r+   s       r,   r1   .PublisherAsyncClient.from_service_account_filel   s+     88AABVX`rcgrkqrrr.   Nclient_optionsc                 .    [         R                  " U5      $ )a'  Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order:
(1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the
client cert source is None.
(2) if `client_options.client_cert_source` is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.

The API endpoint is determined in the following order:
(1) if `client_options.api_endpoint` if provided, use the provided one.
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Args:
    client_options (google.api_core.client_options.ClientOptions): Custom options for the
        client. Only the `api_endpoint` and `client_cert_source` properties may be used
        in this method.

Returns:
    Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the
        client cert source to use.

Raises:
    google.auth.exceptions.MutualTLSChannelError: If any errors happen.
)r    !get_mtls_endpoint_and_cert_source)r)   r3   s     r,   r5   6PublisherAsyncClient.get_mtls_endpoint_and_cert_source~   s    D @@PPr.   returnc                 .    U R                   R                  $ )zReturns the transport used by the client instance.

Returns:
    PublisherTransport: The transport used by the client instance.
)r$   	transportselfs    r,   r9   PublisherAsyncClient.transport   s     ||%%%r.   grpc_asyncior   r9   r3   client_infor   r9   r?   c                &    [        UUUUS9U l        g)a  Instantiates the publisher client.

Args:
    credentials (Optional[google.auth.credentials.Credentials]): The
        authorization credentials to attach to requests. These
        credentials identify the application to the service; if none
        are specified, the client will attempt to ascertain the
        credentials from the environment.
    transport (Union[str, ~.PublisherTransport]): The
        transport to use. If set to None, a transport is chosen
        automatically.
    client_options (ClientOptions): Custom options for the client. It
        won't take effect if a ``transport`` instance is provided.
        (1) The ``api_endpoint`` property can be used to override the
        default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
        environment variable can also be used to override the endpoint:
        "always" (always use the default mTLS endpoint), "never" (always
        use the default regular endpoint) and "auto" (auto switch to the
        default mTLS endpoint if client certificate is present, this is
        the default value). However, the ``api_endpoint`` property takes
        precedence if provided.
        (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable
        is "true", then the ``client_cert_source`` property can be used
        to provide client certificate for mutual TLS transport. If
        not provided, the default SSL client certificate will be used if
        present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not
        set, no client certificate will be used.

Raises:
    google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
        creation failed for any reason.
r>   N)r    r$   )r;   r   r9   r3   r?   s        r,   __init__PublisherAsyncClient.__init__   s    P '#)#	
r.    )namer   r   metadatarequestrD   r   r   rE   c                  #    [        U/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        [
        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [        R                  5      SS9S[         S9n[#        U5      [
        R$                  R'                  SUR                  445      4-   nU" UUUUS	9I Sh  vN nU$  N7f)
a*  Creates the given topic with the given name. See the [resource
name rules]
(https://cloud.google.com/pubsub/docs/admin#resource_names).

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_create_topic():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.Topic(
            name="name_value",
        )

        # Make the request
        response = await client.create_topic(request=request)

        # Handle the response
        print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.Topic, dict]]):
        The request object. A topic resource.
    name (:class:`str`):
        Required. The name of the topic. It must have the format
        ``"projects/{project}/topics/{topic}"``. ``{topic}``
        must start with a letter, and contain only letters
        (``[A-Za-z]``), numbers (``[0-9]``), dashes (``-``),
        underscores (``_``), periods (``.``), tildes (``~``),
        plus (``+``) or percent signs (``%``). It must be
        between 3 and 255 characters in length, and it must not
        start with ``"goog"``.

        This corresponds to the ``name`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.types.Topic:
        A topic resource.
N\If the `request` argument is set, then none of the individual field arguments should be set.皙?      N@?initialmaximum
multiplier	predicatedeadlinedefault_retrydefault_timeoutr?   rD   r   r   rE   )any
ValueErrorr   TopicrD   r   method_asyncwrap_methodr$   
_transportcreate_topicretriesRetryif_exception_typecore_exceptionsServiceUnavailabler   tuplerouting_headerto_grpc_metadata)	r;   rF   rD   r   r   rE   has_flattened_paramsrpcresponses	            r,   r\   !PublisherAsyncClient.create_topic   s    J  #D6{#7@ 
 ,,w' L ##//LL##00!--!33#66  !+ 0 
" ?##44vw||6L5NO&
 

 	
 
 
s   D DD	D)topicupdate_maskr   r   rE   ri   rj   c                @  #    [        X#/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        Ub  X1l        [        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [        R                   5      SS9S["        S9n[%        U5      [        R&                  R)                  SUR                  R*                  445      4-   nU" UUUUS	9I Sh  vN n	U	$  N7f)
aG	  Updates an existing topic. Note that certain
properties of a topic are not modifiable.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_update_topic():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        topic = pubsub_v1.Topic()
        topic.name = "name_value"

        request = pubsub_v1.UpdateTopicRequest(
            topic=topic,
        )

        # Make the request
        response = await client.update_topic(request=request)

        # Handle the response
        print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.UpdateTopicRequest, dict]]):
        The request object. Request for the UpdateTopic method.
    topic (:class:`google.pubsub_v1.types.Topic`):
        Required. The updated topic object.
        This corresponds to the ``topic`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`):
        Required. Indicates which fields in the provided topic
        to update. Must be specified and non-empty. Note that if
        ``update_mask`` contains "message_storage_policy" but
        the ``message_storage_policy`` is not set in the
        ``topic`` provided above, then the updated value is
        determined by the policy configured at the project or
        organization level.

        This corresponds to the ``update_mask`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.types.Topic:
        A topic resource.
NrH   rI   rJ   rK   rL   rR   z
topic.namerU   )rV   rW   r   UpdateTopicRequestri   rj   r   rY   rZ   r$   r[   update_topicr]   r^   r_   r`   ra   r   rb   rc   rd   rD   )
r;   rF   ri   rj   r   r   rE   re   rf   rg   s
             r,   rm   !PublisherAsyncClient.update_topicS  s-    X  #E#78#7@ 
 ++G4 !M""- ##//LL##00!--!33#66  !+ 0 
" ?##44 2 235&
 
 	
 
 
s   DDDD)ri   messagesr   r   rE   ro   c                  #    [        X#/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        U(       a  UR
                  R                  U5        [        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [         R"                  [         R$                  [         R&                  [         R(                  [         R*                  [         R,                  [         R.                  5      SS9S[0        S9n[3        U5      [        R4                  R7                  SUR                  445      4-   nU" UUUUS	9I Sh  vN n	U	$  N7f)
a  Adds one or more messages to the topic. Returns ``NOT_FOUND`` if
the topic does not exist.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_publish():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.PublishRequest(
            topic="topic_value",
        )

        # Make the request
        response = await client.publish(request=request)

        # Handle the response
        print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.PublishRequest, dict]]):
        The request object. Request for the Publish method.
    topic (:class:`str`):
        Required. The messages in the request will be published
        on this topic. Format is
        ``projects/{project}/topics/{topic}``.

        This corresponds to the ``topic`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    messages (:class:`MutableSequence[google.pubsub_v1.types.PubsubMessage]`):
        Required. The messages to publish.
        This corresponds to the ``messages`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.types.PublishResponse:
        Response for the Publish method.
NrH   rI   rJ   g      @rL   rR   ri   rU   )rV   rW   r   PublishRequestri   ro   extendr   rY   rZ   r$   r[   publishr]   r^   r_   r`   Aborted	CancelledDeadlineExceededInternalServerErrorResourceExhaustedra   Unknownr   rb   rc   rd   )
r;   rF   ri   ro   r   r   rE   re   rf   rg   s
             r,   rs   PublisherAsyncClient.publish  se    J  #E#45#7@ 
 ''0 !M##H- ##//LL##++!--!33#++#--#44#77#55#66#++  !+% 0 
. ?##44w6N5PQ&
 

 	
 
 
s   E<F>F?F)ri   r   r   rE   c                V  #    [        U/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        [
        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [        R                  [        R                   [        R"                  5      SS9S[$        S9n['        U5      [
        R(                  R+                  SUR                  445      4-   nU" UUUUS	9I Sh  vN nU$  N7f)
a  Gets the configuration of a topic.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_get_topic():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.GetTopicRequest(
            topic="topic_value",
        )

        # Make the request
        response = await client.get_topic(request=request)

        # Handle the response
        print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.GetTopicRequest, dict]]):
        The request object. Request for the GetTopic method.
    topic (:class:`str`):
        Required. The name of the topic to get. Format is
        ``projects/{project}/topics/{topic}``.

        This corresponds to the ``topic`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.types.Topic:
        A topic resource.
NrH   rI   rJ   rK   rL   rR   ri   rU   )rV   rW   r   GetTopicRequestri   r   rY   rZ   r$   r[   	get_topicr]   r^   r_   r`   rt   ra   ry   r   rb   rc   rd   	r;   rF   ri   r   r   rE   re   rf   rg   s	            r,   r}   PublisherAsyncClient.get_topicP  s(    z  #E7|#7@ 
 ((1 !M ##//LL##--!--!33#++#66#++
 
 !+ 0 
& ?##44w6N5PQ&
 

 	
 
 
s   DD) D'!D))projectr   r   rE   r   c                  #    [        U/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        [
        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [        R                  [        R                   [        R"                  5      SS9S[$        S9n['        U5      [
        R(                  R+                  SUR                  445      4-   nU" UUUUS	9I Sh  vN n[,        R.                  " UUUUS
9nU$  N7f)a`  Lists matching topics.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_list_topics():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.ListTopicsRequest(
            project="project_value",
        )

        # Make the request
        page_result = client.list_topics(request=request)

        # Handle the response
        async for response in page_result:
            print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.ListTopicsRequest, dict]]):
        The request object. Request for the ``ListTopics`` method.
    project (:class:`str`):
        Required. The name of the project in which to list
        topics. Format is ``projects/{project-id}``.

        This corresponds to the ``project`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.services.publisher.pagers.ListTopicsAsyncPager:
        Response for the ListTopics method.

        Iterating over this object will yield results and
        resolve additional pages automatically.

NrH   rI   rJ   rK   rL   rR   r   rU   methodrF   rg   rE   )rV   rW   r   ListTopicsRequestr   r   rY   rZ   r$   r[   list_topicsr]   r^   r_   r`   rt   ra   ry   r   rb   rc   rd   r   ListTopicsAsyncPager)	r;   rF   r   r   r   rE   re   rf   rg   s	            r,   r    PublisherAsyncClient.list_topics  sF    D  #G9~#7@ 
 **73 %O ##//LL##//!--!33#++#66#++
 
 !+ 0 
& ?##44y'//6R5TU&
 

 	
 
 ..	
 #
   DE  D>!E c                  #    [        U/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        [
        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [        R                  [        R                   [        R"                  5      SS9S[$        S9n['        U5      [
        R(                  R+                  SUR                  445      4-   nU" UUUUS	9I Sh  vN n[,        R.                  " UUUUS
9nU$  N7f)a  Lists the names of the attached subscriptions on this
topic.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_list_topic_subscriptions():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.ListTopicSubscriptionsRequest(
            topic="topic_value",
        )

        # Make the request
        page_result = client.list_topic_subscriptions(request=request)

        # Handle the response
        async for response in page_result:
            print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.ListTopicSubscriptionsRequest, dict]]):
        The request object. Request for the ``ListTopicSubscriptions`` method.
    topic (:class:`str`):
        Required. The name of the topic that subscriptions are
        attached to. Format is
        ``projects/{project}/topics/{topic}``.

        This corresponds to the ``topic`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.services.publisher.pagers.ListTopicSubscriptionsAsyncPager:
        Response for the ListTopicSubscriptions method.

        Iterating over this object will yield results and
        resolve additional pages automatically.

NrH   rI   rJ   rK   rL   rR   ri   rU   r   )rV   rW   r   ListTopicSubscriptionsRequestri   r   rY   rZ   r$   r[   list_topic_subscriptionsr]   r^   r_   r`   rt   ra   ry   r   rb   rc   rd   r    ListTopicSubscriptionsAsyncPagerr~   s	            r,   r   -PublisherAsyncClient.list_topic_subscriptions<  sF    H  #E7|#7@ 
 66w? !M ##//LL##<<!--!33#++#66#++
 
 !+ 0 
& ?##44w6N5PQ&
 

 	
 
 ::	
 #
r   c                  #    [        U/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        [
        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [        R                  [        R                   [        R"                  5      SS9S[$        S9n['        U5      [
        R(                  R+                  SUR                  445      4-   nU" UUUUS	9I Sh  vN n[,        R.                  " UUUUS
9nU$  N7f)a  Lists the names of the snapshots on this topic. Snapshots are
used in
`Seek <https://cloud.google.com/pubsub/docs/replay-overview>`__
operations, which allow you to manage message acknowledgments in
bulk. That is, you can set the acknowledgment state of messages
in an existing subscription to the state captured by a snapshot.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_list_topic_snapshots():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.ListTopicSnapshotsRequest(
            topic="topic_value",
        )

        # Make the request
        page_result = client.list_topic_snapshots(request=request)

        # Handle the response
        async for response in page_result:
            print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.ListTopicSnapshotsRequest, dict]]):
        The request object. Request for the ``ListTopicSnapshots`` method.
    topic (:class:`str`):
        Required. The name of the topic that snapshots are
        attached to. Format is
        ``projects/{project}/topics/{topic}``.

        This corresponds to the ``topic`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.services.publisher.pagers.ListTopicSnapshotsAsyncPager:
        Response for the ListTopicSnapshots method.

        Iterating over this object will yield results and
        resolve additional pages automatically.

NrH   rI   rJ   rK   rL   rR   ri   rU   r   )rV   rW   r   ListTopicSnapshotsRequestri   r   rY   rZ   r$   r[   list_topic_snapshotsr]   r^   r_   r`   rt   ra   ry   r   rb   rc   rd   r   ListTopicSnapshotsAsyncPagerr~   s	            r,   r   )PublisherAsyncClient.list_topic_snapshots  sF    P  #E7|#7@ 
 227; !M ##//LL##88!--!33#++#66#++
 
 !+ 0 
& ?##44w6N5PQ&
 

 	
 
 66	
 #
r   c                  #    [        U/5      nUb  U(       a  [        S5      e[        R                  " U5      nUb  X!l        [
        R                  R                  U R                  R                  R                  [        R                  " SSS[        R                  " [        R                  5      SS9S[         S9n[#        U5      [
        R$                  R'                  SUR                  445      4-   nU" UUUUS	9I Sh  vN   g N7f)
aN  Deletes the topic with the given name. Returns ``NOT_FOUND`` if
the topic does not exist. After a topic is deleted, a new topic
may be created with the same name; this is an entirely new topic
with none of the old configuration or subscriptions. Existing
subscriptions to this topic are not deleted, but their ``topic``
field is set to ``_deleted-topic_``.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_delete_topic():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.DeleteTopicRequest(
            topic="topic_value",
        )

        # Make the request
        await client.delete_topic(request=request)

Args:
    request (Optional[Union[google.pubsub_v1.types.DeleteTopicRequest, dict]]):
        The request object. Request for the ``DeleteTopic`` method.
    topic (:class:`str`):
        Required. Name of the topic to delete. Format is
        ``projects/{project}/topics/{topic}``.

        This corresponds to the ``topic`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.
NrH   rI   rJ   rK   rL   rR   ri   rU   )rV   rW   r   DeleteTopicRequestri   r   rY   rZ   r$   r[   delete_topicr]   r^   r_   r`   ra   r   rb   rc   rd   )r;   rF   ri   r   r   rE   re   rf   s           r,   r   !PublisherAsyncClient.delete_topic>  s    v  #E7|#7@ 
 ++G4 !M ##//LL##00!--!33#66  !+ 0 
" ?##44w6N5PQ&
 

 	
 	
 	
s   D D
DD
rU   c                  #    [         R                  " U5      n[        R                  R	                  U R
                  R                  R                  [        R                  " SSS[        R                  " [        R                  5      SS9S[        S9n[        U5      [        R                  R!                  SUR"                  445      4-   nU" UUUUS9I Sh  vN nU$  N7f)	a  Detaches a subscription from this topic. All messages retained
in the subscription are dropped. Subsequent ``Pull`` and
``StreamingPull`` requests will return FAILED_PRECONDITION. If
the subscription is a push subscription, pushes to the endpoint
will stop.

.. code-block:: python

    # This snippet has been automatically generated and should be regarded as a
    # code template only.
    # It will require modifications to work:
    # - It may require correct/in-range values for request initialization.
    # - It may require specifying regional endpoints when creating the service
    #   client as shown in:
    #   https://googleapis.dev/python/google-api-core/latest/client_options.html
    from google import pubsub_v1

    async def sample_detach_subscription():
        # Create a client
        client = pubsub_v1.PublisherAsyncClient()

        # Initialize request argument(s)
        request = pubsub_v1.DetachSubscriptionRequest(
            subscription="subscription_value",
        )

        # Make the request
        response = await client.detach_subscription(request=request)

        # Handle the response
        print(response)

Args:
    request (Optional[Union[google.pubsub_v1.types.DetachSubscriptionRequest, dict]]):
        The request object. Request for the DetachSubscription
        method.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.pubsub_v1.types.DetachSubscriptionResponse:
        Response for the DetachSubscription
        method. Reserved for future use.

rI   rJ   rK   rL   rR   subscriptionrU   N)r   DetachSubscriptionRequestr   rY   rZ   r$   r[   detach_subscriptionr]   r^   r_   r`   ra   r   rb   rc   rd   r   r;   rF   r   r   rE   rf   rg   s          r,   r   (PublisherAsyncClient.detach_subscription  s     t 227; ##//LL##77!--!33#66  !+ 0 
" ?##44 '"6"679&
 
 	
 
 
s   CC!CC!c                ~  #    [        U[        5      (       a  [        R                  " S0 UD6n[        R
                  R                  U R                  R                  R                  S[        S9n[        U5      [        R                  R                  SUR                  445      4-   nU" UUUUS9I Sh  vN nU$  N7f)a  Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Args:
    request (:class:`~.policy_pb2.SetIamPolicyRequest`):
        The request object. Request message for `SetIamPolicy`
        method.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.
Returns:
    ~.policy_pb2.Policy:
        Defines an Identity and Access Management (IAM) policy.
        It is used to specify access control policies for Cloud
        Platform resources.
        A ``Policy`` is a collection of ``bindings``. A
        ``binding`` binds one or more ``members`` to a single
        ``role``. Members can be user accounts, service
        accounts, Google groups, and domains (such as G Suite).
        A ``role`` is a named list of permissions (defined by
        IAM or configured by users). A ``binding`` can
        optionally specify a ``condition``, which is a logic
        expression that further constrains the role binding
        based on attributes about the request and/or target
        resource.

        **JSON Example**

        ::
            {
              "bindings": [
                {
                  "role": "roles/resourcemanager.organizationAdmin",
                  "members": [
                    "user:mike@example.com",
                    "group:admins@example.com",
                    "domain:google.com",
                    "serviceAccount:my-project-id@appspot.gserviceaccount.com"
                  ]
                },
                {
                  "role": "roles/resourcemanager.organizationViewer",
                  "members": ["user:eve@example.com"],
                  "condition": {
                    "title": "expirable access",
                    "description": "Does not grant access after Sep 2020",
                    "expression": "request.time <
                    timestamp('2020-10-01T00:00:00.000Z')",
                  }
                }
              ]
            }

        **YAML Example**

        ::

            bindings:
            - members:
              - user:mike@example.com
              - group:admins@example.com
              - domain:google.com
              - serviceAccount:my-project-id@appspot.gserviceaccount.com
              role: roles/resourcemanager.organizationAdmin
            - members:
              - user:eve@example.com
              role: roles/resourcemanager.organizationViewer
              condition:
                title: expirable access
                description: Does not grant access after Sep 2020
                expression: request.time < timestamp('2020-10-01T00:00:00.000Z')

        For a description of IAM and its features, see the `IAM
        developer's
        guide <https://cloud.google.com/iam/docs>`__.
NrT   r?   resourcerU   rC   )
isinstancedictr   SetIamPolicyRequestr   rY   rZ   r$   r[   set_iam_policyr   rb   rc   rd   r   r   s          r,   r   #PublisherAsyncClient.set_iam_policy  s     x gt$$$88C7CG ##//LL##22 + 0 
 ?##44z7CSCS6T5VW&
 

 	
 
 
   B2B=4B;5B=c                ~  #    [        U[        5      (       a  [        R                  " S0 UD6n[        R
                  R                  U R                  R                  R                  S[        S9n[        U5      [        R                  R                  SUR                  445      4-   nU" UUUUS9I Sh  vN nU$  N7f)a  Gets the IAM access control policy for a function.

Returns an empty policy if the function exists and does
not have a policy set.

Args:
    request (:class:`~.iam_policy_pb2.GetIamPolicyRequest`):
        The request object. Request message for `GetIamPolicy`
        method.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.
Returns:
    ~.policy_pb2.Policy:
        Defines an Identity and Access Management (IAM) policy.
        It is used to specify access control policies for Cloud
        Platform resources.
        A ``Policy`` is a collection of ``bindings``. A
        ``binding`` binds one or more ``members`` to a single
        ``role``. Members can be user accounts, service
        accounts, Google groups, and domains (such as G Suite).
        A ``role`` is a named list of permissions (defined by
        IAM or configured by users). A ``binding`` can
        optionally specify a ``condition``, which is a logic
        expression that further constrains the role binding
        based on attributes about the request and/or target
        resource.

        **JSON Example**

        ::

            {
              "bindings": [
                {
                  "role": "roles/resourcemanager.organizationAdmin",
                  "members": [
                    "user:mike@example.com",
                    "group:admins@example.com",
                    "domain:google.com",
                    "serviceAccount:my-project-id@appspot.gserviceaccount.com"
                  ]
                },
                {
                  "role": "roles/resourcemanager.organizationViewer",
                  "members": ["user:eve@example.com"],
                  "condition": {
                    "title": "expirable access",
                    "description": "Does not grant access after Sep 2020",
                    "expression": "request.time <
                    timestamp('2020-10-01T00:00:00.000Z')",
                  }
                }
              ]
            }

        **YAML Example**

        ::

            bindings:
            - members:
              - user:mike@example.com
              - group:admins@example.com
              - domain:google.com
              - serviceAccount:my-project-id@appspot.gserviceaccount.com
              role: roles/resourcemanager.organizationAdmin
            - members:
              - user:eve@example.com
              role: roles/resourcemanager.organizationViewer
              condition:
                title: expirable access
                description: Does not grant access after Sep 2020
                expression: request.time < timestamp('2020-10-01T00:00:00.000Z')

        For a description of IAM and its features, see the `IAM
        developer's
        guide <https://cloud.google.com/iam/docs>`__.
Nr   r   rU   rC   )r   r   r   GetIamPolicyRequestr   rY   rZ   r$   r[   get_iam_policyr   rb   rc   rd   r   r   s          r,   r   #PublisherAsyncClient.get_iam_policy~  s     | gt$$$88C7CG ##//LL##22 + 0 
 ?##44z7CSCS6T5VW&
 

 	
 
 
r   c                ~  #    [        U[        5      (       a  [        R                  " S0 UD6n[        R
                  R                  U R                  R                  R                  S[        S9n[        U5      [        R                  R                  SUR                  445      4-   nU" UUUUS9I Sh  vN nU$  N7f)a  Tests the specified permissions against the IAM access control
    policy for a function.

If the function does not exist, this will
return an empty set of permissions, not a NOT_FOUND error.

Args:
    request (:class:`~.iam_policy_pb2.TestIamPermissionsRequest`):
        The request object. Request message for
        `TestIamPermissions` method.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (TimeoutType):
        The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.
Returns:
    ~iam_policy_pb2.PolicyTestIamPermissionsResponse:
        Response message for ``TestIamPermissions`` method.
Nr   r   rU   rC   )r   r   r   TestIamPermissionsRequestr   rY   rZ   r$   r[   test_iam_permissionsr   rb   rc   rd   r   r   s          r,   r   )PublisherAsyncClient.test_iam_permissions  s     @ gt$$$>>IIG ##//LL##88 + 0 
 ?##44z7CSCS6T5VW&
 

 	
 
 
r   c                    #    U $ 7fNrC   r:   s    r,   
__aenter__PublisherAsyncClient.__aenter__4  s
     s   c                 T   #    U R                   R                  5       I S h  vN   g  N7fr   )r9   close)r;   exc_typeexctbs       r,   	__aexit__PublisherAsyncClient.__aexit__7  s     nn""$$$s   (&()r$   r   )r7   r"   )b__name__
__module____qualname____firstlineno____doc__r    __annotations__DEFAULT_ENDPOINTDEFAULT_MTLS_ENDPOINTstaticmethodschema_pathparse_schema_pathsubscription_pathparse_subscription_path
topic_pathparse_topic_pathcommon_billing_account_path!parse_common_billing_account_pathcommon_folder_pathparse_common_folder_pathcommon_organization_pathparse_common_organization_pathcommon_project_pathparse_common_project_pathcommon_location_pathparse_common_location_pathclassmethodr   r'   strr1   from_service_account_jsonr   r   r5   propertyr   r9   	functoolspartialtypeget_transport_classr   ga_credentialsCredentialsr   r   r?   
ClientInforA   r   DEFAULTr   rX   OptionalRetryr   r	   r
   r\   rl   r   	FieldMaskrm   rq   r   PubsubMessagePublishResponsers   r|   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   DetachSubscriptionResponser   r   r   r   Policyr   r   r   r   TestIamPermissionsResponser   r   r   __static_attributes__rC   r.   r,   r"   r"   :   s	    &77+AA::;K$_%F%FG$_%F%FG*?+R+RSo889J#O$D$DE".33# )599)% &o&H&HI+O,T,TU+O,T,TU%166&" ''J'JK ,_-V-V W'(L(LM!-22" oT o o s s s !:7;!Q%m4!Q !QF &- & & $++_1143H =A4B267J-
 n889-
 001	-

 !/-
 ))44-
 
-
b 8<s #'66'66.0s%d 234s sm	s
 s s 5c?+s 
sn EI~ )-:>'66'66.0~% 9 94 ?@A~ %	~
 n667~ ~ ~ 5c?+~ 
~D AE{  $DH'66'66.0{% 5 5t ;<={ }	{
 ?6+?+?@A{ { { 5c?+{ 
		{~ BFm  $'66'66.0m% 6 6 <=>m }	m
 m m 5c?+m 
mb DH{ "&'66'66.0{% 8 8$ >?@{ #	{
 { { 5c?+{ 
	$	${~ PT}  $'66'66.0}% D Dd JKL} }	}
 } } 5c?+} 
	0	0}B LPA  $'66'66.0A% @ @$ FGHA }	A
 A A 5c?+A 
	,	,AJ EIf
  $'66'66.0f
% 9 94 ?@Af
 }	f

 f
 f
 5c?+f
 
f
T LP^  (66'66.0^% @ @$ FGH^ 	^
 ^ 5c?+^ 
	*	*^D AEv  (66'66.0v.<<=v 	v
 v 5c?+v 
		vt AEx  (66'66.0x.<<=x 	x
 x 5c?+x 
		xx GK:  (66'66.0:.BBC: 	:
 : 5c?+: 
	2	2:x%r.   r"   )client_library_version)r"   )=collectionsr   r   retypingr   r   r   r   r   r	   r
   r   r   google.pubsub_v1r   package_versiongoogle.api_core.client_optionsr   google.api_corer   r`   r   r   r]   r   timeoutsgoogle.authr   r   google.oauth2r   r^   r   _MethodDefaultr   AttributeErrorobjectgoogle.iam.v1r   r   cloudsdk.google.protobufr   r   #google.pubsub_v1.services.publisherr   google.pubsub_v1.typesr   r   transports.baser   r   transports.grpc_asyncior   clientr    r"   r?   r   __version____all__rC   r.   r,   <module>r      s     $  	
 
 
 > 8 9 $ , / 5 )1'--)G)GGHM ) $ 1 3 6 ) . D B #~% ~%B0 **55*66 6  
 $k0  1'--/0M1s   %C) )DD