From 8adfc3c13dd7b1ba2a0b82e2c72e1f6347c9c8c0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Nov 2021 15:31:25 -0500 Subject: [PATCH] chore: use gapic-generator-python 0.56.2 (#115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update Java and Python dependencies PiperOrigin-RevId: 408420890 Source-Link: https://github.com/googleapis/googleapis/commit/2921f9fb3bfbd16f6b2da0104373e2b47a80a65e Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../transcoder_service/async_client.py | 13 +-- .../services/transcoder_service/client.py | 25 ++++-- .../transcoder_service/transports/base.py | 8 +- .../transcoder_service/transports/grpc.py | 4 +- .../transports/grpc_asyncio.py | 4 +- .../video/transcoder_v1/types/resources.py | 18 ++++ .../transcoder_service/async_client.py | 13 +-- .../services/transcoder_service/client.py | 25 ++++-- .../transcoder_service/transports/base.py | 8 +- .../transcoder_service/transports/grpc.py | 4 +- .../transports/grpc_asyncio.py | 4 +- .../transcoder_v1beta1/types/resources.py | 14 +++ .../transcoder_v1/test_transcoder_service.py | 88 ++++++++++++++----- .../test_transcoder_service.py | 88 ++++++++++++++----- 14 files changed, 230 insertions(+), 86 deletions(-) diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/async_client.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/async_client.py index b7daea988a69..b7567db3369f 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/async_client.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/async_client.py @@ -19,14 +19,17 @@ from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources -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.api_core.client_options import ClientOptions +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.video.transcoder_v1.services.transcoder_service import pagers from google.cloud.video.transcoder_v1.types import resources diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/client.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/client.py index be4298d5ad87..1e10da558857 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/client.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/client.py @@ -14,23 +14,25 @@ # limitations under the License. # from collections import OrderedDict -from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core import client_options as client_options_lib # 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.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.video.transcoder_v1.services.transcoder_service import pagers from google.cloud.video.transcoder_v1.types import resources @@ -311,8 +313,15 @@ def __init__( client_options = client_options_lib.ClientOptions() # Create SSL credentials for mutual TLS if needed. - use_client_cert = bool( - util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) + if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( + "true", + "false", + ): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + use_client_cert = ( + os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" ) client_cert_source_func = None diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/base.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/base.py index 2e7bc751064b..9c9f3cff5130 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/base.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/base.py @@ -18,10 +18,10 @@ import pkg_resources import google.auth # type: ignore -import google.api_core # 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 +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc.py index 457c5af24330..56d734328bbc 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc.py @@ -16,8 +16,8 @@ import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import grpc_helpers # type: ignore -from google.api_core import gapic_v1 # type: ignore +from google.api_core import grpc_helpers +from google.api_core import gapic_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc_asyncio.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc_asyncio.py index 0a0761349d12..c0c87d199e0e 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/services/transcoder_service/transports/grpc_asyncio.py @@ -16,8 +16,8 @@ import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import gapic_v1 # type: ignore -from google.api_core import grpc_helpers_async # type: ignore +from google.api_core import gapic_v1 +from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/types/resources.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/types/resources.py index 23248b0cebcb..cb02c1a96196 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/types/resources.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/types/resources.py @@ -85,6 +85,7 @@ class Job(proto.Message): This field is a member of `oneof`_ ``job_config``. config (google.cloud.video.transcoder_v1.types.JobConfig): The configuration for this job. + This field is a member of `oneof`_ ``job_config``. state (google.cloud.video.transcoder_v1.types.Job.ProcessingState): Output only. The current state of the job. @@ -291,13 +292,16 @@ class ElementaryStream(proto.Message): A unique key for this elementary stream. video_stream (google.cloud.video.transcoder_v1.types.VideoStream): Encoding of a video stream. + This field is a member of `oneof`_ ``elementary_stream``. audio_stream (google.cloud.video.transcoder_v1.types.AudioStream): Encoding of an audio stream. + This field is a member of `oneof`_ ``elementary_stream``. text_stream (google.cloud.video.transcoder_v1.types.TextStream): Encoding of a text stream. For example, closed captions or subtitles. + This field is a member of `oneof`_ ``elementary_stream``. """ @@ -455,10 +459,12 @@ class SpriteSheet(proto.Message): number of sprites distributed evenly across the timeline of the output media. The default is 100. + This field is a member of `oneof`_ ``extraction_strategy``. interval (google.protobuf.duration_pb2.Duration): Starting from ``0s``, create sprites at regular intervals. Specify the interval value in seconds. + This field is a member of `oneof`_ ``extraction_strategy``. quality (int): The quality of the generated sprite sheet. @@ -631,12 +637,15 @@ class Animation(proto.Message): Attributes: animation_static (google.cloud.video.transcoder_v1.types.Overlay.AnimationStatic): Display static overlay object. + This field is a member of `oneof`_ ``animation_type``. animation_fade (google.cloud.video.transcoder_v1.types.Overlay.AnimationFade): Display overlay object with fade animation. + This field is a member of `oneof`_ ``animation_type``. animation_end (google.cloud.video.transcoder_v1.types.Overlay.AnimationEnd): End previous animation. + This field is a member of `oneof`_ ``animation_type``. """ @@ -843,12 +852,15 @@ class VideoStream(proto.Message): Attributes: h264 (google.cloud.video.transcoder_v1.types.VideoStream.H264CodecSettings): H264 codec settings. + This field is a member of `oneof`_ ``codec_settings``. h265 (google.cloud.video.transcoder_v1.types.VideoStream.H265CodecSettings): H265 codec settings. + This field is a member of `oneof`_ ``codec_settings``. vp9 (google.cloud.video.transcoder_v1.types.VideoStream.Vp9CodecSettings): VP9 codec settings. + This field is a member of `oneof`_ ``codec_settings``. """ @@ -919,6 +931,7 @@ class H264CodecSettings(proto.Message): gop_frame_count (int): Select the GOP size based on the specified frame count. Must be greater than zero. + This field is a member of `oneof`_ ``gop_mode``. gop_duration (google.protobuf.duration_pb2.Duration): Select the GOP size based on the specified duration. The @@ -926,6 +939,7 @@ class H264CodecSettings(proto.Message): than or equal to ```segmentDuration`` <#SegmentSettings>`__, and ```segmentDuration`` <#SegmentSettings>`__ must be divisible by ``gopDuration``. + This field is a member of `oneof`_ ``gop_mode``. enable_two_pass (bool): Use two-pass encoding strategy to achieve better video @@ -1077,6 +1091,7 @@ class H265CodecSettings(proto.Message): gop_frame_count (int): Select the GOP size based on the specified frame count. Must be greater than zero. + This field is a member of `oneof`_ ``gop_mode``. gop_duration (google.protobuf.duration_pb2.Duration): Select the GOP size based on the specified duration. The @@ -1084,6 +1099,7 @@ class H265CodecSettings(proto.Message): than or equal to ```segmentDuration`` <#SegmentSettings>`__, and ```segmentDuration`` <#SegmentSettings>`__ must be divisible by ``gopDuration``. + This field is a member of `oneof`_ ``gop_mode``. enable_two_pass (bool): Use two-pass encoding strategy to achieve better video @@ -1244,6 +1260,7 @@ class Vp9CodecSettings(proto.Message): gop_frame_count (int): Select the GOP size based on the specified frame count. Must be greater than zero. + This field is a member of `oneof`_ ``gop_mode``. gop_duration (google.protobuf.duration_pb2.Duration): Select the GOP size based on the specified duration. The @@ -1251,6 +1268,7 @@ class Vp9CodecSettings(proto.Message): than or equal to ```segmentDuration`` <#SegmentSettings>`__, and ```segmentDuration`` <#SegmentSettings>`__ must be divisible by ``gopDuration``. + This field is a member of `oneof`_ ``gop_mode``. profile (str): Enforces the specified codec profile. The following profiles diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py index 8aac7a004aa8..6f41c3f2945e 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py @@ -19,14 +19,17 @@ from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources -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.api_core.client_options import ClientOptions +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.video.transcoder_v1beta1.services.transcoder_service import pagers from google.cloud.video.transcoder_v1beta1.types import resources diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py index f86e1c37ed31..8df1341ea425 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py @@ -14,23 +14,25 @@ # limitations under the License. # from collections import OrderedDict -from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core import client_options as client_options_lib # 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.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.video.transcoder_v1beta1.services.transcoder_service import pagers from google.cloud.video.transcoder_v1beta1.types import resources @@ -310,8 +312,15 @@ def __init__( client_options = client_options_lib.ClientOptions() # Create SSL credentials for mutual TLS if needed. - use_client_cert = bool( - util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) + if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( + "true", + "false", + ): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + use_client_cert = ( + os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" ) client_cert_source_func = None diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py index 65661e88cdc1..7a9c09285bc8 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py @@ -18,10 +18,10 @@ import pkg_resources import google.auth # type: ignore -import google.api_core # 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 +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py index 4f4f46f62fc8..72b5df38e95b 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py @@ -16,8 +16,8 @@ import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import grpc_helpers # type: ignore -from google.api_core import gapic_v1 # type: ignore +from google.api_core import grpc_helpers +from google.api_core import gapic_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py index 5d71361486aa..0e88ee2cbcaa 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py @@ -16,8 +16,8 @@ import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import gapic_v1 # type: ignore -from google.api_core import grpc_helpers_async # type: ignore +from google.api_core import gapic_v1 +from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/types/resources.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/types/resources.py index fae1432d8da7..7c7a7f847b9c 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/types/resources.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1beta1/types/resources.py @@ -87,6 +87,7 @@ class Job(proto.Message): This field is a member of `oneof`_ ``job_config``. config (google.cloud.video.transcoder_v1beta1.types.JobConfig): The configuration for this job. + This field is a member of `oneof`_ ``job_config``. priority (int): Specify the priority of the job. Enter a @@ -340,13 +341,16 @@ class ElementaryStream(proto.Message): A unique key for this elementary stream. video_stream (google.cloud.video.transcoder_v1beta1.types.VideoStream): Encoding of a video stream. + This field is a member of `oneof`_ ``elementary_stream``. audio_stream (google.cloud.video.transcoder_v1beta1.types.AudioStream): Encoding of an audio stream. + This field is a member of `oneof`_ ``elementary_stream``. text_stream (google.cloud.video.transcoder_v1beta1.types.TextStream): Encoding of a text stream. For example, closed captions or subtitles. + This field is a member of `oneof`_ ``elementary_stream``. """ @@ -508,10 +512,12 @@ class SpriteSheet(proto.Message): number of sprites distributed evenly across the timeline of the output media. The default is 100. + This field is a member of `oneof`_ ``extraction_strategy``. interval (google.protobuf.duration_pb2.Duration): Starting from ``0s``, create sprites at regular intervals. Specify the interval value in seconds. + This field is a member of `oneof`_ ``extraction_strategy``. quality (int): The quality of the generated sprite sheet. @@ -684,12 +690,15 @@ class Animation(proto.Message): Attributes: animation_static (google.cloud.video.transcoder_v1beta1.types.Overlay.AnimationStatic): Display static overlay object. + This field is a member of `oneof`_ ``animation_type``. animation_fade (google.cloud.video.transcoder_v1beta1.types.Overlay.AnimationFade): Display overlay object with fade animation. + This field is a member of `oneof`_ ``animation_type``. animation_end (google.cloud.video.transcoder_v1beta1.types.Overlay.AnimationEnd): End previous animation. + This field is a member of `oneof`_ ``animation_type``. """ @@ -983,6 +992,7 @@ class VideoStream(proto.Message): gop_frame_count (int): Select the GOP size based on the specified frame count. Must be greater than zero. + This field is a member of `oneof`_ ``gop_mode``. gop_duration (google.protobuf.duration_pb2.Duration): Select the GOP size based on the specified duration. The @@ -990,6 +1000,7 @@ class VideoStream(proto.Message): than or equal to ```segmentDuration`` <#SegmentSettings>`__, and ```segmentDuration`` <#SegmentSettings>`__ must be divisible by ``gopDuration``. + This field is a member of `oneof`_ ``gop_mode``. entropy_coder (str): The entropy coder to use. The default is ``"cabac"``. @@ -1255,13 +1266,16 @@ class Encryption(proto.Message): represented as lowercase hexadecimal digits. aes_128 (google.cloud.video.transcoder_v1beta1.types.Encryption.Aes128Encryption): Configuration for AES-128 encryption. + This field is a member of `oneof`_ ``encryption_mode``. sample_aes (google.cloud.video.transcoder_v1beta1.types.Encryption.SampleAesEncryption): Configuration for SAMPLE-AES encryption. + This field is a member of `oneof`_ ``encryption_mode``. mpeg_cenc (google.cloud.video.transcoder_v1beta1.types.Encryption.MpegCommonEncryption): Configuration for MPEG Common Encryption (MPEG-CENC). + This field is a member of `oneof`_ ``encryption_mode``. """ diff --git a/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1/test_transcoder_service.py b/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1/test_transcoder_service.py index 0a1c81fbc701..ef49f5132be8 100644 --- a/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1/test_transcoder_service.py +++ b/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1/test_transcoder_service.py @@ -665,8 +665,12 @@ def test_create_job_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job == resources.Job(name="name_value") + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job + mock_val = resources.Job(name="name_value") + assert arg == mock_val def test_create_job_flattened_error(): @@ -704,8 +708,12 @@ async def test_create_job_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job == resources.Job(name="name_value") + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job + mock_val = resources.Job(name="name_value") + assert arg == mock_val @pytest.mark.asyncio @@ -878,7 +886,9 @@ def test_list_jobs_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_jobs_flattened_error(): @@ -914,7 +924,9 @@ async def test_list_jobs_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1207,7 +1219,9 @@ def test_get_job_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_job_flattened_error(): @@ -1241,7 +1255,9 @@ async def test_get_job_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1399,7 +1415,9 @@ def test_delete_job_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_job_flattened_error(): @@ -1433,7 +1451,9 @@ async def test_delete_job_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1615,9 +1635,15 @@ def test_create_job_template_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job_template == resources.JobTemplate(name="name_value") - assert args[0].job_template_id == "job_template_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job_template + mock_val = resources.JobTemplate(name="name_value") + assert arg == mock_val + arg = args[0].job_template_id + mock_val = "job_template_id_value" + assert arg == mock_val def test_create_job_template_flattened_error(): @@ -1662,9 +1688,15 @@ async def test_create_job_template_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job_template == resources.JobTemplate(name="name_value") - assert args[0].job_template_id == "job_template_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job_template + mock_val = resources.JobTemplate(name="name_value") + assert arg == mock_val + arg = args[0].job_template_id + mock_val = "job_template_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1852,7 +1884,9 @@ def test_list_job_templates_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_job_templates_flattened_error(): @@ -1890,7 +1924,9 @@ async def test_list_job_templates_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2206,7 +2242,9 @@ def test_get_job_template_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_job_template_flattened_error(): @@ -2242,7 +2280,9 @@ async def test_get_job_template_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2414,7 +2454,9 @@ def test_delete_job_template_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_job_template_flattened_error(): @@ -2450,7 +2492,9 @@ async def test_delete_job_template_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio diff --git a/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py b/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py index 13b96391442f..364c2ef0abc4 100644 --- a/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py +++ b/packages/google-cloud-video-transcoder/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py @@ -671,8 +671,12 @@ def test_create_job_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job == resources.Job(name="name_value") + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job + mock_val = resources.Job(name="name_value") + assert arg == mock_val def test_create_job_flattened_error(): @@ -710,8 +714,12 @@ async def test_create_job_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job == resources.Job(name="name_value") + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job + mock_val = resources.Job(name="name_value") + assert arg == mock_val @pytest.mark.asyncio @@ -879,7 +887,9 @@ def test_list_jobs_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_jobs_flattened_error(): @@ -915,7 +925,9 @@ async def test_list_jobs_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1216,7 +1228,9 @@ def test_get_job_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_job_flattened_error(): @@ -1250,7 +1264,9 @@ async def test_get_job_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1408,7 +1424,9 @@ def test_delete_job_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_job_flattened_error(): @@ -1442,7 +1460,9 @@ async def test_delete_job_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1624,9 +1644,15 @@ def test_create_job_template_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job_template == resources.JobTemplate(name="name_value") - assert args[0].job_template_id == "job_template_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job_template + mock_val = resources.JobTemplate(name="name_value") + assert arg == mock_val + arg = args[0].job_template_id + mock_val = "job_template_id_value" + assert arg == mock_val def test_create_job_template_flattened_error(): @@ -1671,9 +1697,15 @@ async def test_create_job_template_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].job_template == resources.JobTemplate(name="name_value") - assert args[0].job_template_id == "job_template_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].job_template + mock_val = resources.JobTemplate(name="name_value") + assert arg == mock_val + arg = args[0].job_template_id + mock_val = "job_template_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1856,7 +1888,9 @@ def test_list_job_templates_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_job_templates_flattened_error(): @@ -1894,7 +1928,9 @@ async def test_list_job_templates_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2210,7 +2246,9 @@ def test_get_job_template_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_job_template_flattened_error(): @@ -2246,7 +2284,9 @@ async def test_get_job_template_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2418,7 +2458,9 @@ def test_delete_job_template_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_job_template_flattened_error(): @@ -2454,7 +2496,9 @@ async def test_delete_job_template_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio