Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update generated retry timings for publish and pull rpcs via synth #43

Merged
merged 7 commits into from Mar 23, 2020
50 changes: 26 additions & 24 deletions google/cloud/pubsub_v1/gapic/publisher_client.py
Expand Up @@ -260,12 +260,12 @@ def create_topic(
>>> response = client.create_topic(name)

Args:
name (str): 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"`.
name (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"``.
labels (dict[str -> str]): See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
managing labels</a>.
message_storage_policy (Union[dict, ~google.cloud.pubsub_v1.types.MessageStoragePolicy]): Policy constraining the set of Google Cloud Platform regions where messages
Expand Down Expand Up @@ -358,12 +358,12 @@ def update_topic(
>>> response = client.update_topic(topic, update_mask)

Args:
topic (Union[dict, ~google.cloud.pubsub_v1.types.Topic]): The updated topic object.
topic (Union[dict, ~google.cloud.pubsub_v1.types.Topic]): Required. The updated topic object.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.pubsub_v1.types.Topic`
update_mask (Union[dict, ~google.cloud.pubsub_v1.types.FieldMask]): Indicates which fields in the provided topic to update. Must be
specified and non-empty. Note that if ``update_mask`` contains
update_mask (Union[dict, ~google.cloud.pubsub_v1.types.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" then the new value will be determined based
on the policy configured at the project or organization level. The
``message_storage_policy`` must not be set in the ``topic`` provided
Expand Down Expand Up @@ -444,9 +444,9 @@ def publish(
>>> response = client.publish(topic, messages)

Args:
topic (str): The messages in the request will be published on this topic. Format is
``projects/{project}/topics/{topic}``.
messages (list[Union[dict, ~google.cloud.pubsub_v1.types.PubsubMessage]]): The messages to publish.
topic (str): Required. The messages in the request will be published on this topic.
Format is ``projects/{project}/topics/{topic}``.
messages (list[Union[dict, ~google.cloud.pubsub_v1.types.PubsubMessage]]): Required. The messages to publish.

If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.pubsub_v1.types.PubsubMessage`
Expand Down Expand Up @@ -518,7 +518,7 @@ def get_topic(
>>> response = client.get_topic(topic)

Args:
topic (str): The name of the topic to get. Format is
topic (str): Required. The name of the topic to get. Format is
``projects/{project}/topics/{topic}``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
Expand Down Expand Up @@ -601,7 +601,7 @@ def list_topics(
... pass

Args:
project (str): The name of the project in which to list topics. Format is
project (str): Required. The name of the project in which to list topics. Format is
``projects/{project-id}``.
page_size (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
Expand Down Expand Up @@ -703,8 +703,8 @@ def list_topic_subscriptions(
... pass

Args:
topic (str): The name of the topic that subscriptions are attached to. Format is
``projects/{project}/topics/{topic}``.
topic (str): Required. The name of the topic that subscriptions are attached to.
Format is ``projects/{project}/topics/{topic}``.
page_size (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
Expand Down Expand Up @@ -799,7 +799,7 @@ def delete_topic(
>>> client.delete_topic(topic)

Args:
topic (str): Name of the topic to delete. Format is
topic (str): Required. Name of the topic to delete. Format is
``projects/{project}/topics/{topic}``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
Expand Down Expand Up @@ -855,8 +855,11 @@ def set_iam_policy(
metadata=None,
):
"""
Sets the access control policy on the specified resource. Replaces any
existing policy.
Sets the access control policy on the specified resource. Replaces
any existing policy.

Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and
PERMISSION_DENIED

Example:
>>> from google.cloud import pubsub_v1
Expand Down Expand Up @@ -937,9 +940,8 @@ def get_iam_policy(
metadata=None,
):
"""
Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.
Gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.

Example:
>>> from google.cloud import pubsub_v1
Expand Down Expand Up @@ -1018,8 +1020,8 @@ def test_iam_permissions(
):
"""
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions,
not a NOT\_FOUND error.
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/pubsub_v1/gapic/publisher_client_config.py
Expand Up @@ -47,7 +47,7 @@
"retry_params_name": "default",
},
"Publish": {
"timeout_millis": 60000,
"timeout_millis": 20000,
hongalex marked this conversation as resolved.
Show resolved Hide resolved
"retry_codes_name": "publish",
"retry_params_name": "messaging",
"bundling": {
Expand Down