|
19 | 19 | from typing import Dict, Sequence, Tuple, Type, Union |
20 | 20 | import pkg_resources |
21 | 21 |
|
22 | | -import google.api_core.client_options as ClientOptions # type: ignore |
| 22 | +from google.api_core.client_options import ClientOptions # type: ignore |
23 | 23 | from google.api_core import exceptions as core_exceptions # type: ignore |
24 | 24 | from google.api_core import gapic_v1 # type: ignore |
25 | 25 | from google.api_core import retry as retries # type: ignore |
26 | 26 | from google.auth import credentials as ga_credentials # type: ignore |
27 | 27 | from google.oauth2 import service_account # type: ignore |
28 | 28 |
|
| 29 | +OptionalRetry = Union[retries.Retry, object] |
| 30 | + |
29 | 31 | from google.cloud.video.transcoder_v1.services.transcoder_service import pagers |
30 | 32 | from google.cloud.video.transcoder_v1.types import resources |
31 | 33 | from google.cloud.video.transcoder_v1.types import services |
@@ -177,18 +179,18 @@ def __init__( |
177 | 179 |
|
178 | 180 | async def create_job( |
179 | 181 | self, |
180 | | - request: services.CreateJobRequest = None, |
| 182 | + request: Union[services.CreateJobRequest, dict] = None, |
181 | 183 | *, |
182 | 184 | parent: str = None, |
183 | 185 | job: resources.Job = None, |
184 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 186 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
185 | 187 | timeout: float = None, |
186 | 188 | metadata: Sequence[Tuple[str, str]] = (), |
187 | 189 | ) -> resources.Job: |
188 | 190 | r"""Creates a job in the specified region. |
189 | 191 |
|
190 | 192 | Args: |
191 | | - request (:class:`google.cloud.video.transcoder_v1.types.CreateJobRequest`): |
| 193 | + request (Union[google.cloud.video.transcoder_v1.types.CreateJobRequest, dict]): |
192 | 194 | The request object. Request message for |
193 | 195 | `TranscoderService.CreateJob`. |
194 | 196 | parent (:class:`str`): |
@@ -256,17 +258,17 @@ async def create_job( |
256 | 258 |
|
257 | 259 | async def list_jobs( |
258 | 260 | self, |
259 | | - request: services.ListJobsRequest = None, |
| 261 | + request: Union[services.ListJobsRequest, dict] = None, |
260 | 262 | *, |
261 | 263 | parent: str = None, |
262 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 264 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
263 | 265 | timeout: float = None, |
264 | 266 | metadata: Sequence[Tuple[str, str]] = (), |
265 | 267 | ) -> pagers.ListJobsAsyncPager: |
266 | 268 | r"""Lists jobs in the specified region. |
267 | 269 |
|
268 | 270 | Args: |
269 | | - request (:class:`google.cloud.video.transcoder_v1.types.ListJobsRequest`): |
| 271 | + request (Union[google.cloud.video.transcoder_v1.types.ListJobsRequest, dict]): |
270 | 272 | The request object. Request message for |
271 | 273 | `TranscoderService.ListJobs`. The parent location from |
272 | 274 | which to retrieve the collection of jobs. |
@@ -336,17 +338,17 @@ async def list_jobs( |
336 | 338 |
|
337 | 339 | async def get_job( |
338 | 340 | self, |
339 | | - request: services.GetJobRequest = None, |
| 341 | + request: Union[services.GetJobRequest, dict] = None, |
340 | 342 | *, |
341 | 343 | name: str = None, |
342 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 344 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
343 | 345 | timeout: float = None, |
344 | 346 | metadata: Sequence[Tuple[str, str]] = (), |
345 | 347 | ) -> resources.Job: |
346 | 348 | r"""Returns the job data. |
347 | 349 |
|
348 | 350 | Args: |
349 | | - request (:class:`google.cloud.video.transcoder_v1.types.GetJobRequest`): |
| 351 | + request (Union[google.cloud.video.transcoder_v1.types.GetJobRequest, dict]): |
350 | 352 | The request object. Request message for |
351 | 353 | `TranscoderService.GetJob`. |
352 | 354 | name (:class:`str`): |
@@ -405,17 +407,17 @@ async def get_job( |
405 | 407 |
|
406 | 408 | async def delete_job( |
407 | 409 | self, |
408 | | - request: services.DeleteJobRequest = None, |
| 410 | + request: Union[services.DeleteJobRequest, dict] = None, |
409 | 411 | *, |
410 | 412 | name: str = None, |
411 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 413 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
412 | 414 | timeout: float = None, |
413 | 415 | metadata: Sequence[Tuple[str, str]] = (), |
414 | 416 | ) -> None: |
415 | 417 | r"""Deletes a job. |
416 | 418 |
|
417 | 419 | Args: |
418 | | - request (:class:`google.cloud.video.transcoder_v1.types.DeleteJobRequest`): |
| 420 | + request (Union[google.cloud.video.transcoder_v1.types.DeleteJobRequest, dict]): |
419 | 421 | The request object. Request message for |
420 | 422 | `TranscoderService.DeleteJob`. |
421 | 423 | name (:class:`str`): |
@@ -469,19 +471,19 @@ async def delete_job( |
469 | 471 |
|
470 | 472 | async def create_job_template( |
471 | 473 | self, |
472 | | - request: services.CreateJobTemplateRequest = None, |
| 474 | + request: Union[services.CreateJobTemplateRequest, dict] = None, |
473 | 475 | *, |
474 | 476 | parent: str = None, |
475 | 477 | job_template: resources.JobTemplate = None, |
476 | 478 | job_template_id: str = None, |
477 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 479 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
478 | 480 | timeout: float = None, |
479 | 481 | metadata: Sequence[Tuple[str, str]] = (), |
480 | 482 | ) -> resources.JobTemplate: |
481 | 483 | r"""Creates a job template in the specified region. |
482 | 484 |
|
483 | 485 | Args: |
484 | | - request (:class:`google.cloud.video.transcoder_v1.types.CreateJobTemplateRequest`): |
| 486 | + request (Union[google.cloud.video.transcoder_v1.types.CreateJobTemplateRequest, dict]): |
485 | 487 | The request object. Request message for |
486 | 488 | `TranscoderService.CreateJobTemplate`. |
487 | 489 | parent (:class:`str`): |
@@ -564,17 +566,17 @@ async def create_job_template( |
564 | 566 |
|
565 | 567 | async def list_job_templates( |
566 | 568 | self, |
567 | | - request: services.ListJobTemplatesRequest = None, |
| 569 | + request: Union[services.ListJobTemplatesRequest, dict] = None, |
568 | 570 | *, |
569 | 571 | parent: str = None, |
570 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 572 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
571 | 573 | timeout: float = None, |
572 | 574 | metadata: Sequence[Tuple[str, str]] = (), |
573 | 575 | ) -> pagers.ListJobTemplatesAsyncPager: |
574 | 576 | r"""Lists job templates in the specified region. |
575 | 577 |
|
576 | 578 | Args: |
577 | | - request (:class:`google.cloud.video.transcoder_v1.types.ListJobTemplatesRequest`): |
| 579 | + request (Union[google.cloud.video.transcoder_v1.types.ListJobTemplatesRequest, dict]): |
578 | 580 | The request object. Request message for |
579 | 581 | `TranscoderService.ListJobTemplates`. |
580 | 582 | parent (:class:`str`): |
@@ -644,17 +646,17 @@ async def list_job_templates( |
644 | 646 |
|
645 | 647 | async def get_job_template( |
646 | 648 | self, |
647 | | - request: services.GetJobTemplateRequest = None, |
| 649 | + request: Union[services.GetJobTemplateRequest, dict] = None, |
648 | 650 | *, |
649 | 651 | name: str = None, |
650 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 652 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
651 | 653 | timeout: float = None, |
652 | 654 | metadata: Sequence[Tuple[str, str]] = (), |
653 | 655 | ) -> resources.JobTemplate: |
654 | 656 | r"""Returns the job template data. |
655 | 657 |
|
656 | 658 | Args: |
657 | | - request (:class:`google.cloud.video.transcoder_v1.types.GetJobTemplateRequest`): |
| 659 | + request (Union[google.cloud.video.transcoder_v1.types.GetJobTemplateRequest, dict]): |
658 | 660 | The request object. Request message for |
659 | 661 | `TranscoderService.GetJobTemplate`. |
660 | 662 | name (:class:`str`): |
@@ -714,17 +716,17 @@ async def get_job_template( |
714 | 716 |
|
715 | 717 | async def delete_job_template( |
716 | 718 | self, |
717 | | - request: services.DeleteJobTemplateRequest = None, |
| 719 | + request: Union[services.DeleteJobTemplateRequest, dict] = None, |
718 | 720 | *, |
719 | 721 | name: str = None, |
720 | | - retry: retries.Retry = gapic_v1.method.DEFAULT, |
| 722 | + retry: OptionalRetry = gapic_v1.method.DEFAULT, |
721 | 723 | timeout: float = None, |
722 | 724 | metadata: Sequence[Tuple[str, str]] = (), |
723 | 725 | ) -> None: |
724 | 726 | r"""Deletes a job template. |
725 | 727 |
|
726 | 728 | Args: |
727 | | - request (:class:`google.cloud.video.transcoder_v1.types.DeleteJobTemplateRequest`): |
| 729 | + request (Union[google.cloud.video.transcoder_v1.types.DeleteJobTemplateRequest, dict]): |
728 | 730 | The request object. Request message for |
729 | 731 | `TranscoderService.DeleteJobTemplate`. |
730 | 732 | name (:class:`str`): |
|
0 commit comments