`__.
+ Note that certain values for this field may cause the
+ transcoder to override other fields you set in the
+ ``H265CodecSettings`` message.
"""
width_pixels = proto.Field(proto.INT32, number=1,)
@@ -1094,6 +1115,7 @@ class H265CodecSettings(proto.Message):
class Vp9CodecSettings(proto.Message):
r"""VP9 codec settings.
+
Attributes:
width_pixels (int):
The width of the video in pixels. Must be an
@@ -1118,28 +1140,29 @@ class Vp9CodecSettings(proto.Message):
for more information.
bitrate_bps (int):
Required. The video bitrate in bits per
- second. Must be between 1 and 1,000,000,000.
+ second. The minimum value is 1,000. The maximum
+ value is 480,000,000.
pixel_format (str):
- Pixel format to use. The default is ``"yuv420p"``.
+ Pixel format to use. The default is ``yuv420p``.
Supported pixel formats:
- - 'yuv420p' pixel format.
- - 'yuv422p' pixel format.
- - 'yuv444p' pixel format.
- - 'yuv420p10' 10-bit HDR pixel format.
- - 'yuv422p10' 10-bit HDR pixel format.
- - 'yuv444p10' 10-bit HDR pixel format.
- - 'yuv420p12' 12-bit HDR pixel format.
- - 'yuv422p12' 12-bit HDR pixel format.
- - 'yuv444p12' 12-bit HDR pixel format.
+ - ``yuv420p`` pixel format
+ - ``yuv422p`` pixel format
+ - ``yuv444p`` pixel format
+ - ``yuv420p10`` 10-bit HDR pixel format
+ - ``yuv422p10`` 10-bit HDR pixel format
+ - ``yuv444p10`` 10-bit HDR pixel format
+ - ``yuv420p12`` 12-bit HDR pixel format
+ - ``yuv422p12`` 12-bit HDR pixel format
+ - ``yuv444p12`` 12-bit HDR pixel format
rate_control_mode (str):
- Specify the ``rate_control_mode``. The default is ``"vbr"``.
+ Specify the ``rate_control_mode``. The default is ``vbr``.
Supported rate control modes:
- - 'vbr' - variable bitrate
- - 'crf' - constant rate factor
+ - ``vbr`` - variable bitrate
+ - ``crf`` - constant rate factor
crf_level (int):
Target CRF level. Must be between 10 and 36,
where 10 is the highest quality and 36 is the
@@ -1149,7 +1172,7 @@ class Vp9CodecSettings(proto.Message):
frame count. Must be greater than zero.
gop_duration (google.protobuf.duration_pb2.Duration):
Select the GOP size based on the specified duration. The
- default is ``"3s"``. Note that ``gopDuration`` must be less
+ default is ``3s``. Note that ``gopDuration`` must be less
than or equal to ```segmentDuration`` <#SegmentSettings>`__,
and ```segmentDuration`` <#SegmentSettings>`__ must be
divisible by ``gopDuration``.
@@ -1163,10 +1186,10 @@ class Vp9CodecSettings(proto.Message):
- ``profile3``
The available options are
- `WebM-compatible `__\ {:
- class="external" }. Note that certain values for this field
- may cause the transcoder to override other fields you set in
- the ``Vp9CodecSettings`` message.
+ `WebM-compatible `__.
+ Note that certain values for this field may cause the
+ transcoder to override other fields you set in the
+ ``Vp9CodecSettings`` message.
"""
width_pixels = proto.Field(proto.INT32, number=1,)
@@ -1195,18 +1218,19 @@ class Vp9CodecSettings(proto.Message):
class AudioStream(proto.Message):
r"""Audio stream resource.
+
Attributes:
codec (str):
- The codec for this audio stream. The default is ``"aac"``.
+ The codec for this audio stream. The default is ``aac``.
Supported audio codecs:
- - 'aac'
- - 'aac-he'
- - 'aac-he-v2'
- - 'mp3'
- - 'ac3'
- - 'eac3'
+ - ``aac``
+ - ``aac-he``
+ - ``aac-he-v2``
+ - ``mp3``
+ - ``ac3``
+ - ``eac3``
bitrate_bps (int):
Required. Audio bitrate in bits per second.
Must be between 1 and 10,000,000.
@@ -1221,12 +1245,12 @@ class AudioStream(proto.Message):
Supported channel names:
- - 'fl' - Front left channel
- - 'fr' - Front right channel
- - 'sl' - Side left channel
- - 'sr' - Side right channel
- - 'fc' - Front center channel
- - 'lfe' - Low frequency
+ - ``fl`` - Front left channel
+ - ``fr`` - Front right channel
+ - ``sl`` - Side left channel
+ - ``sr`` - Side right channel
+ - ``fc`` - Front center channel
+ - ``lfe`` - Low frequency
mapping (Sequence[google.cloud.video.transcoder_v1.types.AudioStream.AudioMapping]):
The mapping for the ``Job.edit_list`` atoms with audio
``EditAtom.inputs``.
@@ -1281,15 +1305,15 @@ class TextStream(proto.Message):
Attributes:
codec (str):
- The codec for this text stream. The default is ``"webvtt"``.
+ The codec for this text stream. The default is ``webvtt``.
Supported text codecs:
- - 'srt'
- - 'ttml'
- - 'cea608'
- - 'cea708'
- - 'webvtt'
+ - ``srt``
+ - ``ttml``
+ - ``cea608``
+ - ``cea708``
+ - ``webvtt``
mapping (Sequence[google.cloud.video.transcoder_v1.types.TextStream.TextMapping]):
The mapping for the ``Job.edit_list`` atoms with text
``EditAtom.inputs``.
@@ -1319,12 +1343,13 @@ class TextMapping(proto.Message):
class SegmentSettings(proto.Message):
- r"""Segment settings for ``"ts"``, ``"fmp4"`` and ``"vtt"``.
+ r"""Segment settings for ``ts``, ``fmp4`` and ``vtt``.
+
Attributes:
segment_duration (google.protobuf.duration_pb2.Duration):
Duration of the segments in seconds. The default is
- ``"6.0s"``. Note that ``segmentDuration`` must be greater
- than or equal to ```gopDuration`` <#videostream>`__, and
+ ``6.0s``. Note that ``segmentDuration`` must be greater than
+ or equal to ```gopDuration`` <#videostream>`__, and
``segmentDuration`` must be divisible by
```gopDuration`` <#videostream>`__.
individual_segments (bool):
@@ -1338,72 +1363,4 @@ class SegmentSettings(proto.Message):
individual_segments = proto.Field(proto.BOOL, number=3,)
-class Encryption(proto.Message):
- r"""Encryption settings.
- Attributes:
- key (str):
- Required. 128 bit encryption key represented
- as lowercase hexadecimal digits.
- iv (str):
- Required. 128 bit Initialization Vector (IV)
- represented as lowercase hexadecimal digits.
- aes_128 (google.cloud.video.transcoder_v1.types.Encryption.Aes128Encryption):
- Configuration for AES-128 encryption.
- sample_aes (google.cloud.video.transcoder_v1.types.Encryption.SampleAesEncryption):
- Configuration for SAMPLE-AES encryption.
- mpeg_cenc (google.cloud.video.transcoder_v1.types.Encryption.MpegCommonEncryption):
- Configuration for MPEG Common Encryption
- (MPEG-CENC).
- """
-
- class Aes128Encryption(proto.Message):
- r"""Configuration for AES-128 encryption.
- Attributes:
- key_uri (str):
- Required. URI of the key delivery service.
- This URI is inserted into the M3U8 header.
- """
-
- key_uri = proto.Field(proto.STRING, number=1,)
-
- class SampleAesEncryption(proto.Message):
- r"""Configuration for SAMPLE-AES encryption.
- Attributes:
- key_uri (str):
- Required. URI of the key delivery service.
- This URI is inserted into the M3U8 header.
- """
-
- key_uri = proto.Field(proto.STRING, number=1,)
-
- class MpegCommonEncryption(proto.Message):
- r"""Configuration for MPEG Common Encryption (MPEG-CENC).
- Attributes:
- key_id (str):
- Required. 128 bit Key ID represented as
- lowercase hexadecimal digits for use with common
- encryption.
- scheme (str):
- Required. Specify the encryption scheme.
- Supported encryption schemes:
- - 'cenc'
- - 'cbcs'
- """
-
- key_id = proto.Field(proto.STRING, number=1,)
- scheme = proto.Field(proto.STRING, number=2,)
-
- key = proto.Field(proto.STRING, number=1,)
- iv = proto.Field(proto.STRING, number=2,)
- aes_128 = proto.Field(
- proto.MESSAGE, number=3, oneof="encryption_mode", message=Aes128Encryption,
- )
- sample_aes = proto.Field(
- proto.MESSAGE, number=4, oneof="encryption_mode", message=SampleAesEncryption,
- )
- mpeg_cenc = proto.Field(
- proto.MESSAGE, number=5, oneof="encryption_mode", message=MpegCommonEncryption,
- )
-
-
__all__ = tuple(sorted(__protobuf__.manifest))
diff --git a/google/cloud/video/transcoder_v1/types/services.py b/google/cloud/video/transcoder_v1/types/services.py
index edee4f1..4d67e83 100644
--- a/google/cloud/video/transcoder_v1/types/services.py
+++ b/google/cloud/video/transcoder_v1/types/services.py
@@ -37,6 +37,7 @@
class CreateJobRequest(proto.Message):
r"""Request message for ``TranscoderService.CreateJob``.
+
Attributes:
parent (str):
Required. The parent location to create and process this
@@ -81,6 +82,7 @@ class ListJobsRequest(proto.Message):
class GetJobRequest(proto.Message):
r"""Request message for ``TranscoderService.GetJob``.
+
Attributes:
name (str):
Required. The name of the job to retrieve. Format:
@@ -92,17 +94,24 @@ class GetJobRequest(proto.Message):
class DeleteJobRequest(proto.Message):
r"""Request message for ``TranscoderService.DeleteJob``.
+
Attributes:
name (str):
Required. The name of the job to delete. Format:
``projects/{project}/locations/{location}/jobs/{job}``
+ allow_missing (bool):
+ If set to true, and the job is not found, the
+ request will succeed but no action will be taken
+ on the server.
"""
name = proto.Field(proto.STRING, number=1,)
+ allow_missing = proto.Field(proto.BOOL, number=2,)
class ListJobsResponse(proto.Message):
r"""Response message for ``TranscoderService.ListJobs``.
+
Attributes:
jobs (Sequence[google.cloud.video.transcoder_v1.types.Job]):
List of jobs in the specified region.
@@ -123,6 +132,7 @@ def raw_page(self):
class CreateJobTemplateRequest(proto.Message):
r"""Request message for ``TranscoderService.CreateJobTemplate``.
+
Attributes:
parent (str):
Required. The parent location to create this job template.
@@ -147,6 +157,7 @@ class CreateJobTemplateRequest(proto.Message):
class ListJobTemplatesRequest(proto.Message):
r"""Request message for ``TranscoderService.ListJobTemplates``.
+
Attributes:
parent (str):
Required. The parent location from which to retrieve the
@@ -175,6 +186,7 @@ class ListJobTemplatesRequest(proto.Message):
class GetJobTemplateRequest(proto.Message):
r"""Request message for ``TranscoderService.GetJobTemplate``.
+
Attributes:
name (str):
Required. The name of the job template to retrieve. Format:
@@ -186,17 +198,24 @@ class GetJobTemplateRequest(proto.Message):
class DeleteJobTemplateRequest(proto.Message):
r"""Request message for ``TranscoderService.DeleteJobTemplate``.
+
Attributes:
name (str):
Required. The name of the job template to delete.
``projects/{project}/locations/{location}/jobTemplates/{job_template}``
+ allow_missing (bool):
+ If set to true, and the job template is not
+ found, the request will succeed but no action
+ will be taken on the server.
"""
name = proto.Field(proto.STRING, number=1,)
+ allow_missing = proto.Field(proto.BOOL, number=2,)
class ListJobTemplatesResponse(proto.Message):
r"""Response message for ``TranscoderService.ListJobTemplates``.
+
Attributes:
job_templates (Sequence[google.cloud.video.transcoder_v1.types.JobTemplate]):
List of job templates in the specified
diff --git a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py
index dbdfc03..1929949 100644
--- a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py
+++ b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py
@@ -775,6 +775,12 @@ async def delete_job_template(
request, retry=retry, timeout=timeout, metadata=metadata,
)
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, exc_type, exc, tb):
+ await self.transport.close()
+
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
diff --git a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py
index 96e7c28..a6adc6f 100644
--- a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py
+++ b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py
@@ -371,10 +371,7 @@ def __init__(
client_cert_source_for_mtls=client_cert_source_func,
quota_project_id=client_options.quota_project_id,
client_info=client_info,
- always_use_jwt_access=(
- Transport == type(self).get_transport_class("grpc")
- or Transport == type(self).get_transport_class("grpc_asyncio")
- ),
+ always_use_jwt_access=True,
)
def create_job(
@@ -978,6 +975,19 @@ def delete_job_template(
request, retry=retry, timeout=timeout, metadata=metadata,
)
+ def __enter__(self):
+ return self
+
+ def __exit__(self, type, value, traceback):
+ """Releases underlying transport's resources.
+
+ .. warning::
+ ONLY use as a context manager if the transport is NOT shared
+ with other clients! Exiting the with block will CLOSE the transport
+ and may cause errors in other clients!
+ """
+ self.transport.close()
+
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
diff --git a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py
index c938e19..35f9e9b 100644
--- a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py
+++ b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/base.py
@@ -182,6 +182,15 @@ def _prep_wrapped_messages(self, client_info):
),
}
+ def close(self):
+ """Closes resources associated with the transport.
+
+ .. warning::
+ Only call this method if the transport is NOT shared
+ with other clients - this may cause errors in other clients!
+ """
+ raise NotImplementedError()
+
@property
def create_job(
self,
diff --git a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py
index ef8e5c7..4f4f46f 100644
--- a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py
+++ b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc.py
@@ -437,5 +437,8 @@ def delete_job_template(
)
return self._stubs["delete_job_template"]
+ def close(self):
+ self.grpc_channel.close()
+
__all__ = ("TranscoderServiceGrpcTransport",)
diff --git a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py
index b66a617..2b5324e 100644
--- a/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py
+++ b/google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/grpc_asyncio.py
@@ -446,5 +446,8 @@ def delete_job_template(
)
return self._stubs["delete_job_template"]
+ def close(self):
+ return self.grpc_channel.close()
+
__all__ = ("TranscoderServiceGrpcAsyncIOTransport",)
diff --git a/google/cloud/video/transcoder_v1beta1/types/resources.py b/google/cloud/video/transcoder_v1beta1/types/resources.py
index ceeefa0..50341f1 100644
--- a/google/cloud/video/transcoder_v1beta1/types/resources.py
+++ b/google/cloud/video/transcoder_v1beta1/types/resources.py
@@ -49,6 +49,7 @@
class Job(proto.Message):
r"""Transcoding job resource.
+
Attributes:
name (str):
The resource name of the job. Format:
@@ -132,6 +133,7 @@ class ProcessingState(proto.Enum):
class OriginUri(proto.Message):
r"""The origin URI.
+
Attributes:
hls (str):
HLS manifest URI per
@@ -171,6 +173,7 @@ class OriginUri(proto.Message):
class JobTemplate(proto.Message):
r"""Transcoding job template resource.
+
Attributes:
name (str):
The resource name of the job template. Format:
@@ -185,6 +188,7 @@ class JobTemplate(proto.Message):
class JobConfig(proto.Message):
r"""Job configuration
+
Attributes:
inputs (Sequence[google.cloud.video.transcoder_v1beta1.types.Input]):
List of input assets stored in Cloud Storage.
@@ -230,6 +234,7 @@ class JobConfig(proto.Message):
class Input(proto.Message):
r"""Input asset.
+
Attributes:
key (str):
A unique key for this input. Must be
@@ -253,6 +258,7 @@ class Input(proto.Message):
class Output(proto.Message):
r"""Location of output file(s) in a Cloud Storage bucket.
+
Attributes:
uri (str):
URI for the output file(s). For example,
@@ -265,6 +271,7 @@ class Output(proto.Message):
class EditAtom(proto.Message):
r"""Edit atom.
+
Attributes:
key (str):
A unique key for this atom. Must be specified
@@ -294,6 +301,7 @@ class EditAtom(proto.Message):
class AdBreak(proto.Message):
r"""Ad break.
+
Attributes:
start_time_offset (google.protobuf.duration_pb2.Duration):
Start time in seconds for the ad break, relative to the
@@ -336,6 +344,7 @@ class ElementaryStream(proto.Message):
class MuxStream(proto.Message):
r"""Multiplexing settings for output stream.
+
Attributes:
key (str):
A unique key for this multiplexed stream. HLS media
@@ -377,6 +386,7 @@ class MuxStream(proto.Message):
class Manifest(proto.Message):
r"""Manifest configuration.
+
Attributes:
file_name (str):
The name of the generated file. The default is
@@ -407,6 +417,7 @@ class ManifestType(proto.Enum):
class PubsubDestination(proto.Message):
r"""A Pub/Sub destination.
+
Attributes:
topic (str):
The name of the Pub/Sub topic to publish job completion
@@ -506,6 +517,7 @@ class SpriteSheet(proto.Message):
class Overlay(proto.Message):
r"""Overlay configuration.
+
Attributes:
image (google.cloud.video.transcoder_v1beta1.types.Overlay.Image):
Image overlay.
@@ -522,6 +534,7 @@ class FadeType(proto.Enum):
class NormalizedCoordinate(proto.Message):
r"""2D normalized coordinates. Default: ``{0.0, 0.0}``
+
Attributes:
x (float):
Normalized x coordinate.
@@ -534,6 +547,7 @@ class NormalizedCoordinate(proto.Message):
class Image(proto.Message):
r"""Overlaid jpeg image.
+
Attributes:
uri (str):
Required. URI of the JPEG image in Cloud Storage. For
@@ -559,6 +573,7 @@ class Image(proto.Message):
class AnimationStatic(proto.Message):
r"""Display static overlay object.
+
Attributes:
xy (google.cloud.video.transcoder_v1beta1.types.Overlay.NormalizedCoordinate):
Normalized coordinates based on output video resolution.
@@ -581,6 +596,7 @@ class AnimationStatic(proto.Message):
class AnimationFade(proto.Message):
r"""Display overlay object with fade animation.
+
Attributes:
fade_type (google.cloud.video.transcoder_v1beta1.types.Overlay.FadeType):
Required. Type of fade animation: ``FADE_IN`` or
@@ -628,6 +644,7 @@ class AnimationEnd(proto.Message):
class Animation(proto.Message):
r"""Animation types.
+
Attributes:
animation_static (google.cloud.video.transcoder_v1beta1.types.Overlay.AnimationStatic):
Display static overlay object.
@@ -662,6 +679,7 @@ class Animation(proto.Message):
class PreprocessingConfig(proto.Message):
r"""Preprocessing configurations.
+
Attributes:
color (google.cloud.video.transcoder_v1beta1.types.PreprocessingConfig.Color):
Color preprocessing configuration.
@@ -679,6 +697,7 @@ class PreprocessingConfig(proto.Message):
class Color(proto.Message):
r"""Color preprocessing configuration.
+
Attributes:
saturation (float):
Control color saturation of the video. Enter
@@ -703,6 +722,7 @@ class Color(proto.Message):
class Denoise(proto.Message):
r"""Denoise preprocessing configuration.
+
Attributes:
strength (float):
Set strength of the denoise. Enter a value
@@ -723,6 +743,7 @@ class Denoise(proto.Message):
class Deblock(proto.Message):
r"""Deblock preprocessing configuration.
+
Attributes:
strength (float):
Set strength of the deblocker. Enter a value
@@ -738,6 +759,7 @@ class Deblock(proto.Message):
class Audio(proto.Message):
r"""Audio preprocessing configuration.
+
Attributes:
lufs (float):
Specify audio loudness normalization in loudness units
@@ -824,6 +846,7 @@ class Pad(proto.Message):
class VideoStream(proto.Message):
r"""Video stream resource.
+
Attributes:
codec (str):
Codec type. The following codecs are supported:
@@ -978,6 +1001,7 @@ class VideoStream(proto.Message):
class AudioStream(proto.Message):
r"""Audio stream resource.
+
Attributes:
codec (str):
The codec for this audio stream. The default is ``"aac"``.
@@ -1033,6 +1057,7 @@ class AudioAtom(proto.Message):
class AudioChannel(proto.Message):
r"""The audio channel.
+
Attributes:
inputs (Sequence[google.cloud.video.transcoder_v1beta1.types.AudioStream.AudioAtom.AudioChannel.AudioChannelInput]):
List of ``Job.inputs`` for this audio channel.
@@ -1120,6 +1145,7 @@ class TextAtom(proto.Message):
class TextInput(proto.Message):
r"""Identifies which input file and track should be used.
+
Attributes:
key (str):
Required. The ``Input.key`` that identifies the input file.
@@ -1143,6 +1169,7 @@ class TextInput(proto.Message):
class SegmentSettings(proto.Message):
r"""Segment settings for ``"ts"``, ``"fmp4"`` and ``"vtt"``.
+
Attributes:
segment_duration (google.protobuf.duration_pb2.Duration):
Duration of the segments in seconds. The default is
@@ -1163,6 +1190,7 @@ class SegmentSettings(proto.Message):
class Encryption(proto.Message):
r"""Encryption settings.
+
Attributes:
key (str):
Required. 128 bit encryption key represented
@@ -1181,6 +1209,7 @@ class Encryption(proto.Message):
class Aes128Encryption(proto.Message):
r"""Configuration for AES-128 encryption.
+
Attributes:
key_uri (str):
Required. URI of the key delivery service.
@@ -1191,6 +1220,7 @@ class Aes128Encryption(proto.Message):
class SampleAesEncryption(proto.Message):
r"""Configuration for SAMPLE-AES encryption.
+
Attributes:
key_uri (str):
Required. URI of the key delivery service.
@@ -1201,6 +1231,7 @@ class SampleAesEncryption(proto.Message):
class MpegCommonEncryption(proto.Message):
r"""Configuration for MPEG Common Encryption (MPEG-CENC).
+
Attributes:
key_id (str):
Required. 128 bit Key ID represented as
@@ -1231,6 +1262,7 @@ class MpegCommonEncryption(proto.Message):
class Progress(proto.Message):
r"""Estimated fractional progress for each step, from ``0`` to ``1``.
+
Attributes:
analyzed (float):
Estimated fractional progress for ``analyzing`` step.
@@ -1250,6 +1282,7 @@ class Progress(proto.Message):
class FailureDetail(proto.Message):
r"""Additional information about the reasons for the failure.
+
Attributes:
description (str):
A description of the failure.
diff --git a/google/cloud/video/transcoder_v1beta1/types/services.py b/google/cloud/video/transcoder_v1beta1/types/services.py
index 4255a53..fe23b03 100644
--- a/google/cloud/video/transcoder_v1beta1/types/services.py
+++ b/google/cloud/video/transcoder_v1beta1/types/services.py
@@ -37,6 +37,7 @@
class CreateJobRequest(proto.Message):
r"""Request message for ``TranscoderService.CreateJob``.
+
Attributes:
parent (str):
Required. The parent location to create and process this
@@ -72,6 +73,7 @@ class ListJobsRequest(proto.Message):
class GetJobRequest(proto.Message):
r"""Request message for ``TranscoderService.GetJob``.
+
Attributes:
name (str):
Required. The name of the job to retrieve. Format:
@@ -83,6 +85,7 @@ class GetJobRequest(proto.Message):
class DeleteJobRequest(proto.Message):
r"""Request message for ``TranscoderService.DeleteJob``.
+
Attributes:
name (str):
Required. The name of the job to delete. Format:
@@ -94,6 +97,7 @@ class DeleteJobRequest(proto.Message):
class ListJobsResponse(proto.Message):
r"""Response message for ``TranscoderService.ListJobs``.
+
Attributes:
jobs (Sequence[google.cloud.video.transcoder_v1beta1.types.Job]):
List of jobs in the specified region.
@@ -111,6 +115,7 @@ def raw_page(self):
class CreateJobTemplateRequest(proto.Message):
r"""Request message for ``TranscoderService.CreateJobTemplate``.
+
Attributes:
parent (str):
Required. The parent location to create this job template.
@@ -135,6 +140,7 @@ class CreateJobTemplateRequest(proto.Message):
class ListJobTemplatesRequest(proto.Message):
r"""Request message for ``TranscoderService.ListJobTemplates``.
+
Attributes:
parent (str):
Required. The parent location from which to retrieve the
@@ -154,6 +160,7 @@ class ListJobTemplatesRequest(proto.Message):
class GetJobTemplateRequest(proto.Message):
r"""Request message for ``TranscoderService.GetJobTemplate``.
+
Attributes:
name (str):
Required. The name of the job template to retrieve. Format:
@@ -165,6 +172,7 @@ class GetJobTemplateRequest(proto.Message):
class DeleteJobTemplateRequest(proto.Message):
r"""Request message for ``TranscoderService.DeleteJobTemplate``.
+
Attributes:
name (str):
Required. The name of the job template to delete.
@@ -176,6 +184,7 @@ class DeleteJobTemplateRequest(proto.Message):
class ListJobTemplatesResponse(proto.Message):
r"""Response message for ``TranscoderService.ListJobTemplates``.
+
Attributes:
job_templates (Sequence[google.cloud.video.transcoder_v1beta1.types.JobTemplate]):
List of job templates in the specified
diff --git a/noxfile.py b/noxfile.py
index 93ea9b1..f885c68 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -29,7 +29,7 @@
DEFAULT_PYTHON_VERSION = "3.8"
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
-UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
+UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
diff --git a/setup.py b/setup.py
index 9332c7e..4d79dbd 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@
import os
import setuptools # type: ignore
-version = "1.0.1"
+version = "1.1.0"
package_root = os.path.abspath(os.path.dirname(__file__))
diff --git a/tests/unit/gapic/transcoder_v1/test_transcoder_service.py b/tests/unit/gapic/transcoder_v1/test_transcoder_service.py
index 8bb42af..44a2468 100644
--- a/tests/unit/gapic/transcoder_v1/test_transcoder_service.py
+++ b/tests/unit/gapic/transcoder_v1/test_transcoder_service.py
@@ -29,6 +29,7 @@
from google.api_core import gapic_v1
from google.api_core import grpc_helpers
from google.api_core import grpc_helpers_async
+from google.api_core import path_template
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
from google.cloud.video.transcoder_v1.services.transcoder_service import (
@@ -2594,6 +2595,9 @@ def test_transcoder_service_base_transport():
with pytest.raises(NotImplementedError):
getattr(transport, method)(request=object())
+ with pytest.raises(NotImplementedError):
+ transport.close()
+
@requires_google_auth_gte_1_25_0
def test_transcoder_service_base_transport_with_credentials_file():
@@ -3100,3 +3104,49 @@ def test_client_withDEFAULT_CLIENT_INFO():
credentials=ga_credentials.AnonymousCredentials(), client_info=client_info,
)
prep.assert_called_once_with(client_info)
+
+
+@pytest.mark.asyncio
+async def test_transport_close_async():
+ client = TranscoderServiceAsyncClient(
+ credentials=ga_credentials.AnonymousCredentials(), transport="grpc_asyncio",
+ )
+ with mock.patch.object(
+ type(getattr(client.transport, "grpc_channel")), "close"
+ ) as close:
+ async with client:
+ close.assert_not_called()
+ close.assert_called_once()
+
+
+def test_transport_close():
+ transports = {
+ "grpc": "_grpc_channel",
+ }
+
+ for transport, close_name in transports.items():
+ client = TranscoderServiceClient(
+ credentials=ga_credentials.AnonymousCredentials(), transport=transport
+ )
+ with mock.patch.object(
+ type(getattr(client.transport, close_name)), "close"
+ ) as close:
+ with client:
+ close.assert_not_called()
+ close.assert_called_once()
+
+
+def test_client_ctx():
+ transports = [
+ "grpc",
+ ]
+ for transport in transports:
+ client = TranscoderServiceClient(
+ credentials=ga_credentials.AnonymousCredentials(), transport=transport
+ )
+ # Test client calls underlying transport.
+ with mock.patch.object(type(client.transport), "close") as close:
+ close.assert_not_called()
+ with client:
+ pass
+ close.assert_called()
diff --git a/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py b/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py
index bece6f5..83c15c4 100644
--- a/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py
+++ b/tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py
@@ -29,6 +29,7 @@
from google.api_core import gapic_v1
from google.api_core import grpc_helpers
from google.api_core import grpc_helpers_async
+from google.api_core import path_template
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
from google.cloud.video.transcoder_v1beta1.services.transcoder_service import (
@@ -2598,6 +2599,9 @@ def test_transcoder_service_base_transport():
with pytest.raises(NotImplementedError):
getattr(transport, method)(request=object())
+ with pytest.raises(NotImplementedError):
+ transport.close()
+
@requires_google_auth_gte_1_25_0
def test_transcoder_service_base_transport_with_credentials_file():
@@ -3104,3 +3108,49 @@ def test_client_withDEFAULT_CLIENT_INFO():
credentials=ga_credentials.AnonymousCredentials(), client_info=client_info,
)
prep.assert_called_once_with(client_info)
+
+
+@pytest.mark.asyncio
+async def test_transport_close_async():
+ client = TranscoderServiceAsyncClient(
+ credentials=ga_credentials.AnonymousCredentials(), transport="grpc_asyncio",
+ )
+ with mock.patch.object(
+ type(getattr(client.transport, "grpc_channel")), "close"
+ ) as close:
+ async with client:
+ close.assert_not_called()
+ close.assert_called_once()
+
+
+def test_transport_close():
+ transports = {
+ "grpc": "_grpc_channel",
+ }
+
+ for transport, close_name in transports.items():
+ client = TranscoderServiceClient(
+ credentials=ga_credentials.AnonymousCredentials(), transport=transport
+ )
+ with mock.patch.object(
+ type(getattr(client.transport, close_name)), "close"
+ ) as close:
+ with client:
+ close.assert_not_called()
+ close.assert_called_once()
+
+
+def test_client_ctx():
+ transports = [
+ "grpc",
+ ]
+ for transport in transports:
+ client = TranscoderServiceClient(
+ credentials=ga_credentials.AnonymousCredentials(), transport=transport
+ )
+ # Test client calls underlying transport.
+ with mock.patch.object(type(client.transport), "close") as close:
+ close.assert_not_called()
+ with client:
+ pass
+ close.assert_called()
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy