diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 24d5689..4fcfdf7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.8.2" + ".": "1.9.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 21f0586..fed2236 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.9.0](https://github.com/googleapis/python-video-transcoder/compare/v1.8.2...v1.9.0) (2023-04-13) + + +### Features + +* Add support for batch processing mode ([#300](https://github.com/googleapis/python-video-transcoder/issues/300)) ([b1bbc0d](https://github.com/googleapis/python-video-transcoder/commit/b1bbc0dbd10ae60da462b0e50207da7e440cb86a)) + ## [1.8.2](https://github.com/googleapis/python-video-transcoder/compare/v1.8.1...v1.8.2) (2023-04-12) diff --git a/google/cloud/video/transcoder/gapic_version.py b/google/cloud/video/transcoder/gapic_version.py index 9a1b07e..163d151 100644 --- a/google/cloud/video/transcoder/gapic_version.py +++ b/google/cloud/video/transcoder/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.2" # {x-release-please-version} +__version__ = "1.9.0" # {x-release-please-version} diff --git a/google/cloud/video/transcoder_v1/gapic_version.py b/google/cloud/video/transcoder_v1/gapic_version.py index 9a1b07e..163d151 100644 --- a/google/cloud/video/transcoder_v1/gapic_version.py +++ b/google/cloud/video/transcoder_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.2" # {x-release-please-version} +__version__ = "1.9.0" # {x-release-please-version} diff --git a/google/cloud/video/transcoder_v1/types/resources.py b/google/cloud/video/transcoder_v1/types/resources.py index c125eb6..1bb5fe3 100644 --- a/google/cloud/video/transcoder_v1/types/resources.py +++ b/google/cloud/video/transcoder_v1/types/resources.py @@ -79,13 +79,10 @@ class Job(proto.Message): formats `__. template_id (str): Input only. Specify the ``template_id`` to use for - populating ``Job.config``. The default is ``preset/web-hd``. + populating ``Job.config``. The default is ``preset/web-hd``, + which is the only supported preset. - Preset Transcoder templates: - - - ``preset/{preset_id}`` - - - User defined JobTemplate: ``{job_template_id}`` + User defined JobTemplate: ``{job_template_id}`` This field is a member of `oneof`_ ``job_config``. config (google.cloud.video.transcoder_v1.types.JobConfig): @@ -114,6 +111,9 @@ class Job(proto.Message): Output only. An error object that describes the reason for the failure. This property is always present when ``state`` is ``FAILED``. + mode (google.cloud.video.transcoder_v1.types.Job.ProcessingMode): + The processing mode of the job. The default is + ``PROCESSING_MODE_INTERACTIVE``. """ class ProcessingState(proto.Enum): @@ -139,6 +139,24 @@ class ProcessingState(proto.Enum): SUCCEEDED = 3 FAILED = 4 + class ProcessingMode(proto.Enum): + r"""The processing mode of the job. + + Values: + PROCESSING_MODE_UNSPECIFIED (0): + The job processing mode is not specified. + PROCESSING_MODE_INTERACTIVE (1): + The job processing mode is interactive mode. + Interactive job will either be ran or rejected + if quota does not allow for it. + PROCESSING_MODE_BATCH (2): + The job processing mode is batch mode. + Batch mode allows queuing of jobs. + """ + PROCESSING_MODE_UNSPECIFIED = 0 + PROCESSING_MODE_INTERACTIVE = 1 + PROCESSING_MODE_BATCH = 2 + name: str = proto.Field( proto.STRING, number=1, @@ -196,6 +214,11 @@ class ProcessingState(proto.Enum): number=17, message=status_pb2.Status, ) + mode: ProcessingMode = proto.Field( + proto.ENUM, + number=20, + enum=ProcessingMode, + ) class JobTemplate(proto.Message): @@ -785,13 +808,13 @@ class NormalizedCoordinate(proto.Message): ) class Image(proto.Message): - r"""Overlaid jpeg image. + r"""Overlaid image. Attributes: uri (str): - Required. URI of the JPEG image in Cloud Storage. For - example, ``gs://bucket/inputs/image.jpeg``. JPEG is the only - supported image type. + Required. URI of the image in Cloud Storage. For example, + ``gs://bucket/inputs/image.png``. Only PNG and JPEG images + are supported. resolution (google.cloud.video.transcoder_v1.types.Overlay.NormalizedCoordinate): Normalized image resolution, based on output video resolution. Valid values: ``0.0``–``1.0``. To respect the @@ -2047,9 +2070,11 @@ class AudioStream(proto.Message): The BCP-47 language code, such as ``en-US`` or ``sr-Latn``. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + Not supported in MP4 files. display_name (str): The name for this particular audio stream - that will be added to the HLS/DASH manifest. + that will be added to the HLS/DASH manifest. Not + supported in MP4 files. """ class AudioMapping(proto.Message): @@ -2156,12 +2181,14 @@ class TextStream(proto.Message): The BCP-47 language code, such as ``en-US`` or ``sr-Latn``. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + Not supported in MP4 files. mapping_ (MutableSequence[google.cloud.video.transcoder_v1.types.TextStream.TextMapping]): The mapping for the ``Job.edit_list`` atoms with text ``EditAtom.inputs``. display_name (str): The name for this particular text stream that - will be added to the HLS/DASH manifest. + will be added to the HLS/DASH manifest. Not + supported in MP4 files. """ class TextMapping(proto.Message): diff --git a/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json index 4587da9..f2386af 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-video-transcoder", - "version": "1.8.2" + "version": "1.9.0" }, "snippets": [ { diff --git a/tests/unit/gapic/transcoder_v1/test_transcoder_service.py b/tests/unit/gapic/transcoder_v1/test_transcoder_service.py index 8861260..7d110a6 100644 --- a/tests/unit/gapic/transcoder_v1/test_transcoder_service.py +++ b/tests/unit/gapic/transcoder_v1/test_transcoder_service.py @@ -762,6 +762,7 @@ def test_create_job(request_type, transport: str = "grpc"): output_uri="output_uri_value", state=resources.Job.ProcessingState.PENDING, ttl_after_completion_days=2670, + mode=resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE, template_id="template_id_value", ) response = client.create_job(request) @@ -778,6 +779,7 @@ def test_create_job(request_type, transport: str = "grpc"): assert response.output_uri == "output_uri_value" assert response.state == resources.Job.ProcessingState.PENDING assert response.ttl_after_completion_days == 2670 + assert response.mode == resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE def test_create_job_empty_call(): @@ -819,6 +821,7 @@ async def test_create_job_async( output_uri="output_uri_value", state=resources.Job.ProcessingState.PENDING, ttl_after_completion_days=2670, + mode=resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE, ) ) response = await client.create_job(request) @@ -835,6 +838,7 @@ async def test_create_job_async( assert response.output_uri == "output_uri_value" assert response.state == resources.Job.ProcessingState.PENDING assert response.ttl_after_completion_days == 2670 + assert response.mode == resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE @pytest.mark.asyncio @@ -1441,6 +1445,7 @@ def test_get_job(request_type, transport: str = "grpc"): output_uri="output_uri_value", state=resources.Job.ProcessingState.PENDING, ttl_after_completion_days=2670, + mode=resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE, template_id="template_id_value", ) response = client.get_job(request) @@ -1457,6 +1462,7 @@ def test_get_job(request_type, transport: str = "grpc"): assert response.output_uri == "output_uri_value" assert response.state == resources.Job.ProcessingState.PENDING assert response.ttl_after_completion_days == 2670 + assert response.mode == resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE def test_get_job_empty_call(): @@ -1498,6 +1504,7 @@ async def test_get_job_async( output_uri="output_uri_value", state=resources.Job.ProcessingState.PENDING, ttl_after_completion_days=2670, + mode=resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE, ) ) response = await client.get_job(request) @@ -1514,6 +1521,7 @@ async def test_get_job_async( assert response.output_uri == "output_uri_value" assert response.state == resources.Job.ProcessingState.PENDING assert response.ttl_after_completion_days == 2670 + assert response.mode == resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE @pytest.mark.asyncio @@ -3302,6 +3310,7 @@ def test_create_job_rest(request_type): } ], }, + "mode": 1, } request = request_type(**request_init) @@ -3314,6 +3323,7 @@ def test_create_job_rest(request_type): output_uri="output_uri_value", state=resources.Job.ProcessingState.PENDING, ttl_after_completion_days=2670, + mode=resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE, template_id="template_id_value", ) @@ -3334,6 +3344,7 @@ def test_create_job_rest(request_type): assert response.output_uri == "output_uri_value" assert response.state == resources.Job.ProcessingState.PENDING assert response.ttl_after_completion_days == 2670 + assert response.mode == resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE def test_create_job_rest_required_fields(request_type=services.CreateJobRequest): @@ -3721,6 +3732,7 @@ def test_create_job_rest_bad_request( } ], }, + "mode": 1, } request = request_type(**request_init) @@ -4164,6 +4176,7 @@ def test_get_job_rest(request_type): output_uri="output_uri_value", state=resources.Job.ProcessingState.PENDING, ttl_after_completion_days=2670, + mode=resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE, template_id="template_id_value", ) @@ -4184,6 +4197,7 @@ def test_get_job_rest(request_type): assert response.output_uri == "output_uri_value" assert response.state == resources.Job.ProcessingState.PENDING assert response.ttl_after_completion_days == 2670 + assert response.mode == resources.Job.ProcessingMode.PROCESSING_MODE_INTERACTIVE def test_get_job_rest_required_fields(request_type=services.GetJobRequest): 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