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

docs: Fix formatting of request arg in docstring #894

Merged
merged 9 commits into from
Apr 4, 2023
11 changes: 4 additions & 7 deletions google/pubsub_v1/services/publisher/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ async def sample_list_topics():

Args:
request (Optional[Union[google.pubsub_v1.types.ListTopicsRequest, dict]]):
The request object. Request for the `ListTopics` method.
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}``.
Expand Down Expand Up @@ -866,8 +866,7 @@ async def sample_list_topic_subscriptions():

Args:
request (Optional[Union[google.pubsub_v1.types.ListTopicSubscriptionsRequest, dict]]):
The request object. Request for the
`ListTopicSubscriptions` method.
The request object. Request for the ``ListTopicSubscriptions`` method.
topic (:class:`str`):
Required. The name of the topic that subscriptions are
attached to. Format is
Expand Down Expand Up @@ -998,8 +997,7 @@ async def sample_list_topic_snapshots():

Args:
request (Optional[Union[google.pubsub_v1.types.ListTopicSnapshotsRequest, dict]]):
The request object. Request for the `ListTopicSnapshots`
method.
The request object. Request for the ``ListTopicSnapshots`` method.
topic (:class:`str`):
Required. The name of the topic that snapshots are
attached to. Format is
Expand Down Expand Up @@ -1126,8 +1124,7 @@ async def sample_delete_topic():

Args:
request (Optional[Union[google.pubsub_v1.types.DeleteTopicRequest, dict]]):
The request object. Request for the `DeleteTopic`
method.
The request object. Request for the ``DeleteTopic`` method.
topic (:class:`str`):
Required. Name of the topic to delete. Format is
``projects/{project}/topics/{topic}``.
Expand Down
11 changes: 4 additions & 7 deletions google/pubsub_v1/services/publisher/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ def sample_list_topics():

Args:
request (Union[google.pubsub_v1.types.ListTopicsRequest, dict]):
The request object. Request for the `ListTopics` method.
The request object. Request for the ``ListTopics`` method.
project (str):
Required. The name of the project in which to list
topics. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -1091,8 +1091,7 @@ def sample_list_topic_subscriptions():

Args:
request (Union[google.pubsub_v1.types.ListTopicSubscriptionsRequest, dict]):
The request object. Request for the
`ListTopicSubscriptions` method.
The request object. Request for the ``ListTopicSubscriptions`` method.
topic (str):
Required. The name of the topic that subscriptions are
attached to. Format is
Expand Down Expand Up @@ -1212,8 +1211,7 @@ def sample_list_topic_snapshots():

Args:
request (Union[google.pubsub_v1.types.ListTopicSnapshotsRequest, dict]):
The request object. Request for the `ListTopicSnapshots`
method.
The request object. Request for the ``ListTopicSnapshots`` method.
topic (str):
Required. The name of the topic that snapshots are
attached to. Format is
Expand Down Expand Up @@ -1329,8 +1327,7 @@ def sample_delete_topic():

Args:
request (Union[google.pubsub_v1.types.DeleteTopicRequest, dict]):
The request object. Request for the `DeleteTopic`
method.
The request object. Request for the ``DeleteTopic`` method.
topic (str):
Required. Name of the topic to delete. Format is
``projects/{project}/topics/{topic}``.
Expand Down
21 changes: 7 additions & 14 deletions google/pubsub_v1/services/schema_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,7 @@ async def sample_list_schemas():

Args:
request (Optional[Union[google.pubsub_v1.types.ListSchemasRequest, dict]]):
The request object. Request for the `ListSchemas`
method.
The request object. Request for the ``ListSchemas`` method.
parent (:class:`str`):
Required. The name of the project in which to list
schemas. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -600,8 +599,7 @@ async def sample_list_schema_revisions():

Args:
request (Optional[Union[google.pubsub_v1.types.ListSchemaRevisionsRequest, dict]]):
The request object. Request for the
`ListSchemaRevisions` method.
The request object. Request for the ``ListSchemaRevisions`` method.
name (:class:`str`):
Required. The name of the schema to
list revisions for.
Expand Down Expand Up @@ -829,8 +827,7 @@ async def sample_rollback_schema():

Args:
request (Optional[Union[google.pubsub_v1.types.RollbackSchemaRequest, dict]]):
The request object. Request for the `RollbackSchema`
method.
The request object. Request for the ``RollbackSchema`` method.
name (:class:`str`):
Required. The schema being rolled
back with revision id.
Expand Down Expand Up @@ -941,8 +938,7 @@ async def sample_delete_schema_revision():

Args:
request (Optional[Union[google.pubsub_v1.types.DeleteSchemaRevisionRequest, dict]]):
The request object. Request for the
`DeleteSchemaRevision` method.
The request object. Request for the ``DeleteSchemaRevision`` method.
name (:class:`str`):
Required. The name of the schema revision to be deleted,
with a revision ID explicitly included.
Expand Down Expand Up @@ -1050,8 +1046,7 @@ async def sample_delete_schema():

Args:
request (Optional[Union[google.pubsub_v1.types.DeleteSchemaRequest, dict]]):
The request object. Request for the `DeleteSchema`
method.
The request object. Request for the ``DeleteSchema`` method.
name (:class:`str`):
Required. Name of the schema to delete. Format is
``projects/{project}/schemas/{schema}``.
Expand Down Expand Up @@ -1148,8 +1143,7 @@ async def sample_validate_schema():

Args:
request (Optional[Union[google.pubsub_v1.types.ValidateSchemaRequest, dict]]):
The request object. Request for the `ValidateSchema`
method.
The request object. Request for the ``ValidateSchema`` method.
parent (:class:`str`):
Required. The name of the project in which to validate
schemas. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -1259,8 +1253,7 @@ async def sample_validate_message():

Args:
request (Optional[Union[google.pubsub_v1.types.ValidateMessageRequest, dict]]):
The request object. Request for the `ValidateMessage`
method.
The request object. Request for the ``ValidateMessage`` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand Down
21 changes: 7 additions & 14 deletions google/pubsub_v1/services/schema_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,7 @@ def sample_list_schemas():

Args:
request (Union[google.pubsub_v1.types.ListSchemasRequest, dict]):
The request object. Request for the `ListSchemas`
method.
The request object. Request for the ``ListSchemas`` method.
parent (str):
Required. The name of the project in which to list
schemas. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -832,8 +831,7 @@ def sample_list_schema_revisions():

Args:
request (Union[google.pubsub_v1.types.ListSchemaRevisionsRequest, dict]):
The request object. Request for the
`ListSchemaRevisions` method.
The request object. Request for the ``ListSchemaRevisions`` method.
name (str):
Required. The name of the schema to
list revisions for.
Expand Down Expand Up @@ -1061,8 +1059,7 @@ def sample_rollback_schema():

Args:
request (Union[google.pubsub_v1.types.RollbackSchemaRequest, dict]):
The request object. Request for the `RollbackSchema`
method.
The request object. Request for the ``RollbackSchema`` method.
name (str):
Required. The schema being rolled
back with revision id.
Expand Down Expand Up @@ -1173,8 +1170,7 @@ def sample_delete_schema_revision():

Args:
request (Union[google.pubsub_v1.types.DeleteSchemaRevisionRequest, dict]):
The request object. Request for the
`DeleteSchemaRevision` method.
The request object. Request for the ``DeleteSchemaRevision`` method.
name (str):
Required. The name of the schema revision to be deleted,
with a revision ID explicitly included.
Expand Down Expand Up @@ -1282,8 +1278,7 @@ def sample_delete_schema():

Args:
request (Union[google.pubsub_v1.types.DeleteSchemaRequest, dict]):
The request object. Request for the `DeleteSchema`
method.
The request object. Request for the ``DeleteSchema`` method.
name (str):
Required. Name of the schema to delete. Format is
``projects/{project}/schemas/{schema}``.
Expand Down Expand Up @@ -1380,8 +1375,7 @@ def sample_validate_schema():

Args:
request (Union[google.pubsub_v1.types.ValidateSchemaRequest, dict]):
The request object. Request for the `ValidateSchema`
method.
The request object. Request for the ``ValidateSchema`` method.
parent (str):
Required. The name of the project in which to validate
schemas. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -1491,8 +1485,7 @@ def sample_validate_message():

Args:
request (Union[google.pubsub_v1.types.ValidateMessageRequest, dict]):
The request object. Request for the `ValidateMessage`
method.
The request object. Request for the ``ValidateMessage`` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand Down
33 changes: 14 additions & 19 deletions google/pubsub_v1/services/subscriber/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ async def sample_create_subscription():

Args:
request (Optional[Union[google.pubsub_v1.types.Subscription, dict]]):
The request object. A subscription resource. If none of
`push_config` or `bigquery_config` is set, then the
subscriber will pull and ack messages using API methods.
At most one of these fields may be set.
The request object. A subscription resource. If none of ``push_config`` or
``bigquery_config`` is set, then the subscriber will
pull and ack messages using API methods. At most one of
these fields may be set.
name (:class:`str`):
Required. The name of the subscription. It must have the
format
Expand Down Expand Up @@ -706,8 +706,7 @@ async def sample_list_subscriptions():

Args:
request (Optional[Union[google.pubsub_v1.types.ListSubscriptionsRequest, dict]]):
The request object. Request for the `ListSubscriptions`
method.
The request object. Request for the ``ListSubscriptions`` method.
project (:class:`str`):
Required. The name of the project in which to list
subscriptions. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -1194,7 +1193,7 @@ async def sample_pull():

Args:
request (Optional[Union[google.pubsub_v1.types.PullRequest, dict]]):
The request object. Request for the `Pull` method.
The request object. Request for the ``Pull`` method.
subscription (:class:`str`):
Required. The subscription from which messages should be
pulled. Format is
Expand Down Expand Up @@ -1360,11 +1359,10 @@ def request_generator():

Args:
requests (AsyncIterator[`google.pubsub_v1.types.StreamingPullRequest`]):
The request object AsyncIterator. Request for the `StreamingPull`
streaming RPC method. This request is used to establish
the initial stream as well as to stream acknowledgements
and ack deadline modifications from the client to the
server.
The request object AsyncIterator. Request for the ``StreamingPull`` streaming RPC method.
This request is used to establish the initial stream as
well as to stream acknowledgements and ack deadline
modifications from the client to the server.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand Down Expand Up @@ -1697,8 +1695,7 @@ async def sample_list_snapshots():

Args:
request (Optional[Union[google.pubsub_v1.types.ListSnapshotsRequest, dict]]):
The request object. Request for the `ListSnapshots`
method.
The request object. Request for the ``ListSnapshots`` method.
project (:class:`str`):
Required. The name of the project in which to list
snapshots. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -1841,8 +1838,7 @@ async def sample_create_snapshot():

Args:
request (Optional[Union[google.pubsub_v1.types.CreateSnapshotRequest, dict]]):
The request object. Request for the `CreateSnapshot`
method.
The request object. Request for the ``CreateSnapshot`` method.
name (:class:`str`):
Required. User-provided name for this snapshot. If the
name is not provided in the request, the server will
Expand Down Expand Up @@ -2116,8 +2112,7 @@ async def sample_delete_snapshot():

Args:
request (Optional[Union[google.pubsub_v1.types.DeleteSnapshotRequest, dict]]):
The request object. Request for the `DeleteSnapshot`
method.
The request object. Request for the ``DeleteSnapshot`` method.
snapshot (:class:`str`):
Required. The name of the snapshot to delete. Format is
``projects/{project}/snapshots/{snap}``.
Expand Down Expand Up @@ -2225,7 +2220,7 @@ async def sample_seek():

Args:
request (Optional[Union[google.pubsub_v1.types.SeekRequest, dict]]):
The request object. Request for the `Seek` method.
The request object. Request for the ``Seek`` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand Down
33 changes: 14 additions & 19 deletions google/pubsub_v1/services/subscriber/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,10 @@ def sample_create_subscription():

Args:
request (Union[google.pubsub_v1.types.Subscription, dict]):
The request object. A subscription resource. If none of
`push_config` or `bigquery_config` is set, then the
subscriber will pull and ack messages using API methods.
At most one of these fields may be set.
The request object. A subscription resource. If none of ``push_config`` or
``bigquery_config`` is set, then the subscriber will
pull and ack messages using API methods. At most one of
these fields may be set.
name (str):
Required. The name of the subscription. It must have the
format
Expand Down Expand Up @@ -954,8 +954,7 @@ def sample_list_subscriptions():

Args:
request (Union[google.pubsub_v1.types.ListSubscriptionsRequest, dict]):
The request object. Request for the `ListSubscriptions`
method.
The request object. Request for the ``ListSubscriptions`` method.
project (str):
Required. The name of the project in which to list
subscriptions. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -1404,7 +1403,7 @@ def sample_pull():

Args:
request (Union[google.pubsub_v1.types.PullRequest, dict]):
The request object. Request for the `Pull` method.
The request object. Request for the ``Pull`` method.
subscription (str):
Required. The subscription from which messages should be
pulled. Format is
Expand Down Expand Up @@ -1558,11 +1557,10 @@ def request_generator():

Args:
requests (Iterator[google.pubsub_v1.types.StreamingPullRequest]):
The request object iterator. Request for the `StreamingPull`
streaming RPC method. This request is used to establish
the initial stream as well as to stream acknowledgements
and ack deadline modifications from the client to the
server.
The request object iterator. Request for the ``StreamingPull`` streaming RPC method.
This request is used to establish the initial stream as
well as to stream acknowledgements and ack deadline
modifications from the client to the server.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand Down Expand Up @@ -1863,8 +1861,7 @@ def sample_list_snapshots():

Args:
request (Union[google.pubsub_v1.types.ListSnapshotsRequest, dict]):
The request object. Request for the `ListSnapshots`
method.
The request object. Request for the ``ListSnapshots`` method.
project (str):
Required. The name of the project in which to list
snapshots. Format is ``projects/{project-id}``.
Expand Down Expand Up @@ -1996,8 +1993,7 @@ def sample_create_snapshot():

Args:
request (Union[google.pubsub_v1.types.CreateSnapshotRequest, dict]):
The request object. Request for the `CreateSnapshot`
method.
The request object. Request for the ``CreateSnapshot`` method.
name (str):
Required. User-provided name for this snapshot. If the
name is not provided in the request, the server will
Expand Down Expand Up @@ -2253,8 +2249,7 @@ def sample_delete_snapshot():

Args:
request (Union[google.pubsub_v1.types.DeleteSnapshotRequest, dict]):
The request object. Request for the `DeleteSnapshot`
method.
The request object. Request for the ``DeleteSnapshot`` method.
snapshot (str):
Required. The name of the snapshot to delete. Format is
``projects/{project}/snapshots/{snap}``.
Expand Down Expand Up @@ -2353,7 +2348,7 @@ def sample_seek():

Args:
request (Union[google.pubsub_v1.types.SeekRequest, dict]):
The request object. Request for the `Seek` method.
The request object. Request for the ``Seek`` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand Down
Loading