Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.53.4 (#187)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

docs: list oneofs in docstring
fix(deps): require google-api-core >= 1.28.0
fix(deps): drop packaging dependency

committer: busunkim96@
PiperOrigin-RevId: 406468269

Source-Link: googleapis/googleapis@83d81b0

Source-Link: https://github.com/googleapis/googleapis-gen/commit/2ff001fbacb9e77e71d734de5f955c05fdae8526
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZmMDAxZmJhY2I5ZTc3ZTcxZDczNGRlNWY5NTVjMDVmZGFlODUyNiJ9
  • Loading branch information
gcf-owl-bot[bot] authored Nov 1, 2021
1 parent ee6f5b0 commit 72f150f
Show file tree
Hide file tree
Showing 24 changed files with 323 additions and 558 deletions.
100 changes: 51 additions & 49 deletions google/cloud/tasks_v2/services/cloud_tasks/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
from typing import Dict, Sequence, Tuple, Type, Union
import pkg_resources

import google.api_core.client_options as ClientOptions # type: ignore
from google.api_core.client_options import ClientOptions # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

OptionalRetry = Union[retries.Retry, object]

from google.cloud.tasks_v2.services.cloud_tasks import pagers
from google.cloud.tasks_v2.types import cloudtasks
from google.cloud.tasks_v2.types import queue
Expand Down Expand Up @@ -171,18 +173,18 @@ def __init__(

async def list_queues(
self,
request: cloudtasks.ListQueuesRequest = None,
request: Union[cloudtasks.ListQueuesRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListQueuesAsyncPager:
r"""Lists queues.
Queues are returned in lexicographical order.
Args:
request (:class:`google.cloud.tasks_v2.types.ListQueuesRequest`):
request (Union[google.cloud.tasks_v2.types.ListQueuesRequest, dict]):
The request object. Request message for
[ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
parent (:class:`str`):
Expand Down Expand Up @@ -262,17 +264,17 @@ async def list_queues(

async def get_queue(
self,
request: cloudtasks.GetQueueRequest = None,
request: Union[cloudtasks.GetQueueRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> queue.Queue:
r"""Gets a queue.
Args:
request (:class:`google.cloud.tasks_v2.types.GetQueueRequest`):
request (Union[google.cloud.tasks_v2.types.GetQueueRequest, dict]):
The request object. Request message for
[GetQueue][google.cloud.tasks.v2.CloudTasks.GetQueue].
name (:class:`str`):
Expand Down Expand Up @@ -347,11 +349,11 @@ async def get_queue(

async def create_queue(
self,
request: cloudtasks.CreateQueueRequest = None,
request: Union[cloudtasks.CreateQueueRequest, dict] = None,
*,
parent: str = None,
queue: gct_queue.Queue = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gct_queue.Queue:
Expand All @@ -368,7 +370,7 @@ async def create_queue(
before using this method.
Args:
request (:class:`google.cloud.tasks_v2.types.CreateQueueRequest`):
request (Union[google.cloud.tasks_v2.types.CreateQueueRequest, dict]):
The request object. Request message for
[CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue].
parent (:class:`str`):
Expand Down Expand Up @@ -449,11 +451,11 @@ async def create_queue(

async def update_queue(
self,
request: cloudtasks.UpdateQueueRequest = None,
request: Union[cloudtasks.UpdateQueueRequest, dict] = None,
*,
queue: gct_queue.Queue = None,
update_mask: field_mask_pb2.FieldMask = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gct_queue.Queue:
Expand All @@ -473,7 +475,7 @@ async def update_queue(
before using this method.
Args:
request (:class:`google.cloud.tasks_v2.types.UpdateQueueRequest`):
request (Union[google.cloud.tasks_v2.types.UpdateQueueRequest, dict]):
The request object. Request message for
[UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue].
queue (:class:`google.cloud.tasks_v2.types.Queue`):
Expand Down Expand Up @@ -559,10 +561,10 @@ async def update_queue(

async def delete_queue(
self,
request: cloudtasks.DeleteQueueRequest = None,
request: Union[cloudtasks.DeleteQueueRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
Expand All @@ -580,7 +582,7 @@ async def delete_queue(
before using this method.
Args:
request (:class:`google.cloud.tasks_v2.types.DeleteQueueRequest`):
request (Union[google.cloud.tasks_v2.types.DeleteQueueRequest, dict]):
The request object. Request message for
[DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue].
name (:class:`str`):
Expand Down Expand Up @@ -644,10 +646,10 @@ async def delete_queue(

async def purge_queue(
self,
request: cloudtasks.PurgeQueueRequest = None,
request: Union[cloudtasks.PurgeQueueRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> queue.Queue:
Expand All @@ -659,7 +661,7 @@ async def purge_queue(
effect. A purge is irreversible.
Args:
request (:class:`google.cloud.tasks_v2.types.PurgeQueueRequest`):
request (Union[google.cloud.tasks_v2.types.PurgeQueueRequest, dict]):
The request object. Request message for
[PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue].
name (:class:`str`):
Expand Down Expand Up @@ -724,10 +726,10 @@ async def purge_queue(

async def pause_queue(
self,
request: cloudtasks.PauseQueueRequest = None,
request: Union[cloudtasks.PauseQueueRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> queue.Queue:
Expand All @@ -741,7 +743,7 @@ async def pause_queue(
[PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
Args:
request (:class:`google.cloud.tasks_v2.types.PauseQueueRequest`):
request (Union[google.cloud.tasks_v2.types.PauseQueueRequest, dict]):
The request object. Request message for
[PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue].
name (:class:`str`):
Expand Down Expand Up @@ -806,10 +808,10 @@ async def pause_queue(

async def resume_queue(
self,
request: cloudtasks.ResumeQueueRequest = None,
request: Union[cloudtasks.ResumeQueueRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> queue.Queue:
Expand All @@ -830,7 +832,7 @@ async def resume_queue(
Risks <https://cloud.google.com/tasks/docs/manage-cloud-task-scaling>`__.
Args:
request (:class:`google.cloud.tasks_v2.types.ResumeQueueRequest`):
request (Union[google.cloud.tasks_v2.types.ResumeQueueRequest, dict]):
The request object. Request message for
[ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue].
name (:class:`str`):
Expand Down Expand Up @@ -895,10 +897,10 @@ async def resume_queue(

async def get_iam_policy(
self,
request: iam_policy_pb2.GetIamPolicyRequest = None,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
*,
resource: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
Expand All @@ -913,7 +915,7 @@ async def get_iam_policy(
- ``cloudtasks.queues.getIamPolicy``
Args:
request (:class:`google.iam.v1.iam_policy_pb2.GetIamPolicyRequest`):
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
The request object. Request message for `GetIamPolicy`
method.
resource (:class:`str`):
Expand Down Expand Up @@ -1039,10 +1041,10 @@ async def get_iam_policy(

async def set_iam_policy(
self,
request: iam_policy_pb2.SetIamPolicyRequest = None,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
*,
resource: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
Expand All @@ -1061,7 +1063,7 @@ async def set_iam_policy(
- ``cloudtasks.queues.setIamPolicy``
Args:
request (:class:`google.iam.v1.iam_policy_pb2.SetIamPolicyRequest`):
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
The request object. Request message for `SetIamPolicy`
method.
resource (:class:`str`):
Expand Down Expand Up @@ -1177,11 +1179,11 @@ async def set_iam_policy(

async def test_iam_permissions(
self,
request: iam_policy_pb2.TestIamPermissionsRequest = None,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
*,
resource: str = None,
permissions: Sequence[str] = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:
Expand All @@ -1196,7 +1198,7 @@ async def test_iam_permissions(
warning.
Args:
request (:class:`google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest`):
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
The request object. Request message for
`TestIamPermissions` method.
resource (:class:`str`):
Expand Down Expand Up @@ -1278,10 +1280,10 @@ async def test_iam_permissions(

async def list_tasks(
self,
request: cloudtasks.ListTasksRequest = None,
request: Union[cloudtasks.ListTasksRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListTasksAsyncPager:
Expand All @@ -1297,7 +1299,7 @@ async def list_tasks(
at any time.
Args:
request (:class:`google.cloud.tasks_v2.types.ListTasksRequest`):
request (Union[google.cloud.tasks_v2.types.ListTasksRequest, dict]):
The request object. Request message for listing tasks
using
[ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
Expand Down Expand Up @@ -1378,17 +1380,17 @@ async def list_tasks(

async def get_task(
self,
request: cloudtasks.GetTaskRequest = None,
request: Union[cloudtasks.GetTaskRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> task.Task:
r"""Gets a task.
Args:
request (:class:`google.cloud.tasks_v2.types.GetTaskRequest`):
request (Union[google.cloud.tasks_v2.types.GetTaskRequest, dict]):
The request object. Request message for getting a task
using
[GetTask][google.cloud.tasks.v2.CloudTasks.GetTask].
Expand Down Expand Up @@ -1458,11 +1460,11 @@ async def get_task(

async def create_task(
self,
request: cloudtasks.CreateTaskRequest = None,
request: Union[cloudtasks.CreateTaskRequest, dict] = None,
*,
parent: str = None,
task: gct_task.Task = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gct_task.Task:
Expand All @@ -1474,7 +1476,7 @@ async def create_task(
- The maximum task size is 100KB.
Args:
request (:class:`google.cloud.tasks_v2.types.CreateTaskRequest`):
request (Union[google.cloud.tasks_v2.types.CreateTaskRequest, dict]):
The request object. Request message for
[CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
parent (:class:`str`):
Expand Down Expand Up @@ -1583,10 +1585,10 @@ async def create_task(

async def delete_task(
self,
request: cloudtasks.DeleteTaskRequest = None,
request: Union[cloudtasks.DeleteTaskRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
Expand All @@ -1596,7 +1598,7 @@ async def delete_task(
or permanently failed.
Args:
request (:class:`google.cloud.tasks_v2.types.DeleteTaskRequest`):
request (Union[google.cloud.tasks_v2.types.DeleteTaskRequest, dict]):
The request object. Request message for deleting a task
using
[DeleteTask][google.cloud.tasks.v2.CloudTasks.DeleteTask].
Expand Down Expand Up @@ -1661,10 +1663,10 @@ async def delete_task(

async def run_task(
self,
request: cloudtasks.RunTaskRequest = None,
request: Union[cloudtasks.RunTaskRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> task.Task:
Expand Down Expand Up @@ -1697,7 +1699,7 @@ async def run_task(
task that has already succeeded or permanently failed.
Args:
request (:class:`google.cloud.tasks_v2.types.RunTaskRequest`):
request (Union[google.cloud.tasks_v2.types.RunTaskRequest, dict]):
The request object. Request message for forcing a task
to run now using
[RunTask][google.cloud.tasks.v2.CloudTasks.RunTask].
Expand Down
Loading

0 comments on commit 72f150f

Please sign in to comment.