From b1f648e2d2ff5d8a33c4090e182ed4bca7a1f71b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 May 2022 00:22:30 +0200 Subject: [PATCH 01/13] chore(deps): update dependency com.google.cloud:google-cloud-video-transcoder to v1.1.0 (#348) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-video-transcoder](https://togithub.com/googleapis/java-) | `1.0.4` -> `1.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.1.0/compatibility-slim/1.0.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-transcoder/1.1.0/confidence-slim/1.0.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-video-transcoder). --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6c30588f..529d4f80 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-video-transcoder - 1.0.4 + 1.1.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-video-transcoder:1.0.4' +implementation 'com.google.cloud:google-cloud-video-transcoder:1.1.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-video-transcoder" % "1.0.4" +libraryDependencies += "com.google.cloud" % "google-cloud-video-transcoder" % "1.1.0" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index e38def41..6553c3f1 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-video-transcoder - 1.0.4 + 1.1.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4a2438be..23ad1859 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-video-transcoder - 1.0.4 + 1.1.0 From 22e15b7b36e3473e701dfeac48955882133c6219 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 04:10:11 +0000 Subject: [PATCH 02/13] chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 (#346) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 450543911 Source-Link: https://github.com/googleapis/googleapis/commit/55283447ab72f10b6c2571d770af0498b593e84f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9f6775cab1958982b88967a43e5e806af0f135db Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWY2Nzc1Y2FiMTk1ODk4MmI4ODk2N2E0M2U1ZTgwNmFmMGYxMzVkYiJ9 --- .../cloud/video/transcoder/v1/TranscoderServiceClient.java | 4 ---- .../transcoder/v1/stub/TranscoderServiceStubSettings.java | 1 - 2 files changed, 5 deletions(-) diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java index 7c70f041..25bc9675 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java @@ -18,7 +18,6 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; @@ -131,7 +130,6 @@ public static final TranscoderServiceClient create(TranscoderServiceSettings set * Constructs an instance of TranscoderServiceClient, using the given stub for making calls. This * is for advanced usage - prefer using create(TranscoderServiceSettings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final TranscoderServiceClient create(TranscoderServiceStub stub) { return new TranscoderServiceClient(stub); } @@ -146,7 +144,6 @@ protected TranscoderServiceClient(TranscoderServiceSettings settings) throws IOE this.stub = ((TranscoderServiceStubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected TranscoderServiceClient(TranscoderServiceStub stub) { this.settings = null; this.stub = stub; @@ -156,7 +153,6 @@ public final TranscoderServiceSettings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public TranscoderServiceStub getStub() { return stub; } diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java index 1b5d8ffe..e9161dd8 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java @@ -270,7 +270,6 @@ public UnaryCallSettings deleteJobTemplateSetti return deleteJobTemplateSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public TranscoderServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() From 823956e1a662fec14f886925f1cb1a9e1549fd7f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jun 2022 19:04:27 +0200 Subject: [PATCH 03/13] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.0 (#351) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.4.0` -> `1.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/compatibility-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/confidence-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.5.0`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​150-httpsgithubcomgoogleapisjava-shared-configcomparev140v150-2022-06-10) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.4.0...v1.5.0) ##### Features - add build scripts for native image testing in Java 17 ([#​1440](https://togithub.com/googleapis/java-shared-config/issues/1440)) ([#​475](https://togithub.com/googleapis/java-shared-config/issues/475)) ([e4dfc1b](https://togithub.com/googleapis/java-shared-config/commit/e4dfc1ba29295158c78c8fcf94467d2a6a33538a)) - to produce Java 8 compatible bytecode when using JDK 9+ ([2468276](https://togithub.com/googleapis/java-shared-config/commit/2468276145cdfe1ca911b52f765e026e77661a09)) ##### Dependencies - update surefire.version to v3.0.0-m7 ([bbfe663](https://togithub.com/googleapis/java-shared-config/commit/bbfe66393af3e49612c9c1e4334ba39c133ea1d0))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-video-transcoder). --- google-cloud-video-transcoder-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-video-transcoder-bom/pom.xml b/google-cloud-video-transcoder-bom/pom.xml index 6ad68036..cdfa190b 100644 --- a/google-cloud-video-transcoder-bom/pom.xml +++ b/google-cloud-video-transcoder-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 Google Video Transcoder BOM diff --git a/pom.xml b/pom.xml index 3c228387..16f84736 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 From f5c5102d829a6bed5e78a2cadae858145b6a9a1a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 20:18:11 +0000 Subject: [PATCH 04/13] chore: Integrate new gapic-generator-java and rules_gapic (#349) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 454027580 Source-Link: https://github.com/googleapis/googleapis/commit/1b222777baa702e7135610355706570ed2b56318 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9 --- .../cloud/video/transcoder/v1/TranscoderServiceClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java index 25bc9675..7469520f 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java @@ -396,7 +396,7 @@ public final UnaryCallable listJobsPaged * .build(); * while (true) { * ListJobsResponse response = transcoderServiceClient.listJobsCallable().call(request); - * for (Job element : response.getResponsesList()) { + * for (Job element : response.getJobsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -881,7 +881,7 @@ public final ListJobTemplatesPagedResponse listJobTemplates(ListJobTemplatesRequ * while (true) { * ListJobTemplatesResponse response = * transcoderServiceClient.listJobTemplatesCallable().call(request); - * for (JobTemplate element : response.getResponsesList()) { + * for (JobTemplate element : response.getJobTemplatesList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); From 6280cab87aef2f01692a95af268cb7596b1edc3b Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Tue, 14 Jun 2022 21:34:25 +0000 Subject: [PATCH 05/13] chore: include generated samples dir (#350) --- .github/.OwlBot.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 1bb43825..54a121d6 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -16,6 +16,7 @@ docker: image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" deep-remove-regex: +- "/samples/snippets/generated" - "/grpc-google-.*/src" - "/proto-google-.*/src" - "/google-.*/src" @@ -30,3 +31,5 @@ deep-copy-regex: dest: "/owl-bot-staging/$1/grpc-google-cloud-video-transcoder-$1/src" - source: "/google/cloud/video/transcoder/(v.*)/.*-java/gapic-google-.*/src" dest: "/owl-bot-staging/$1/google-cloud-video-transcoder/src" +- source: "/google/cloud/video/transcoder/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/$1/samples/snippets/generated" From 018d0133234c871a77736ce840cfd5052a72ecdc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:24:11 +0000 Subject: [PATCH 06/13] feat: add support for user labels for job and job template (#352) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 455298767 Source-Link: https://github.com/googleapis/googleapis/commit/a9969d336bc114b5ab1a1c81b91d4495540ea76f Source-Link: https://github.com/googleapis/googleapis-gen/commit/63c22c65700434a9dac45dbb4958954696755d07 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNjMjJjNjU3MDA0MzRhOWRhYzQ1ZGJiNDk1ODk1NDY5Njc1NWQwNyJ9 --- .../v1/TranscoderServiceClientTest.java | 9 + .../cloud/video/transcoder/v1/Input.java | 28 +- .../video/transcoder/v1/InputOrBuilder.java | 8 +- .../google/cloud/video/transcoder/v1/Job.java | 392 +++++++++++++++++- .../cloud/video/transcoder/v1/JobConfig.java | 23 + .../transcoder/v1/JobConfigOrBuilder.java | 5 + .../video/transcoder/v1/JobOrBuilder.java | 80 +++- .../video/transcoder/v1/JobTemplate.java | 336 +++++++++++++++ .../transcoder/v1/JobTemplateOrBuilder.java | 64 +++ .../cloud/video/transcoder/v1/MuxStream.java | 21 + .../transcoder/v1/MuxStreamOrBuilder.java | 6 + .../cloud/video/transcoder/v1/Output.java | 28 +- .../video/transcoder/v1/OutputOrBuilder.java | 8 +- .../transcoder/v1/PreprocessingConfig.java | 16 + .../video/transcoder/v1/ResourcesProto.java | 377 +++++++++-------- .../video/transcoder/v1/VideoStream.java | 14 +- .../cloud/video/transcoder/v1/resources.proto | 68 ++- .../cloud/video/transcoder/v1/services.proto | 2 +- .../createjob/SyncCreateJob.java | 47 +++ .../SyncCreateSetCredentialsProvider.java | 42 ++ .../create/SyncCreateSetEndpoint.java | 39 ++ .../createjob/AsyncCreateJob.java | 47 +++ .../createjob/SyncCreateJob.java | 44 ++ .../SyncCreateJobLocationnameJob.java | 40 ++ .../createjob/SyncCreateJobStringJob.java | 40 ++ .../AsyncCreateJobTemplate.java | 49 +++ .../SyncCreateJobTemplate.java | 45 ++ ...TemplateLocationnameJobtemplateString.java | 44 ++ ...ateJobTemplateStringJobtemplateString.java | 44 ++ .../deletejob/AsyncDeleteJob.java | 47 +++ .../deletejob/SyncDeleteJob.java | 43 ++ .../deletejob/SyncDeleteJobJobname.java | 38 ++ .../deletejob/SyncDeleteJobString.java | 38 ++ .../AsyncDeleteJobTemplate.java | 48 +++ .../SyncDeleteJobTemplate.java | 43 ++ .../SyncDeleteJobTemplateJobtemplatename.java | 38 ++ .../SyncDeleteJobTemplateString.java | 38 ++ .../getjob/AsyncGetJob.java | 46 ++ .../getjob/SyncGetJob.java | 43 ++ .../getjob/SyncGetJobJobname.java | 39 ++ .../getjob/SyncGetJobString.java | 39 ++ .../getjobtemplate/AsyncGetJobTemplate.java | 47 +++ .../getjobtemplate/SyncGetJobTemplate.java | 43 ++ .../SyncGetJobTemplateJobtemplatename.java | 39 ++ .../SyncGetJobTemplateString.java | 39 ++ .../listjobs/AsyncListJobs.java | 52 +++ .../listjobs/AsyncListJobsPaged.java | 60 +++ .../listjobs/SyncListJobs.java | 49 +++ .../listjobs/SyncListJobsLocationname.java | 41 ++ .../listjobs/SyncListJobsString.java | 41 ++ .../AsyncListJobTemplates.java | 53 +++ .../AsyncListJobTemplatesPaged.java | 61 +++ .../SyncListJobTemplates.java | 49 +++ .../SyncListJobTemplatesLocationname.java | 41 ++ .../SyncListJobTemplatesString.java | 41 ++ .../createjob/SyncCreateJob.java | 46 ++ 56 files changed, 2932 insertions(+), 236 deletions(-) create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/stub/transcoderservicestubsettings/createjob/SyncCreateJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/AsyncCreateJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobLocationnameJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobStringJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/AsyncCreateJobTemplate.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplate.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateLocationnameJobtemplateString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateStringJobtemplateString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/AsyncDeleteJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobJobname.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/AsyncDeleteJobTemplate.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplate.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateJobtemplatename.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/AsyncGetJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJob.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobJobname.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/AsyncGetJobTemplate.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplate.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateJobtemplatename.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobs.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobsPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobs.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsLocationname.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplates.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplatesPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplates.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesLocationname.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesString.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderservicesettings/createjob/SyncCreateJob.java diff --git a/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientTest.java b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientTest.java index 140b10b2..9559af86 100644 --- a/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientTest.java +++ b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientTest.java @@ -34,6 +34,7 @@ import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import javax.annotation.Generated; @@ -93,6 +94,7 @@ public void createJobTest() throws Exception { .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) .setError(Status.newBuilder().build()) .build(); mockTranscoderService.addResponse(expectedResponse); @@ -141,6 +143,7 @@ public void createJobTest2() throws Exception { .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) .setError(Status.newBuilder().build()) .build(); mockTranscoderService.addResponse(expectedResponse); @@ -277,6 +280,7 @@ public void getJobTest() throws Exception { .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) .setError(Status.newBuilder().build()) .build(); mockTranscoderService.addResponse(expectedResponse); @@ -322,6 +326,7 @@ public void getJobTest2() throws Exception { .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) .setError(Status.newBuilder().build()) .build(); mockTranscoderService.addResponse(expectedResponse); @@ -430,6 +435,7 @@ public void createJobTemplateTest() throws Exception { JobTemplate.newBuilder() .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockTranscoderService.addResponse(expectedResponse); @@ -475,6 +481,7 @@ public void createJobTemplateTest2() throws Exception { JobTemplate.newBuilder() .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockTranscoderService.addResponse(expectedResponse); @@ -608,6 +615,7 @@ public void getJobTemplateTest() throws Exception { JobTemplate.newBuilder() .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockTranscoderService.addResponse(expectedResponse); @@ -647,6 +655,7 @@ public void getJobTemplateTest2() throws Exception { JobTemplate.newBuilder() .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) .build(); mockTranscoderService.addResponse(expectedResponse); diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Input.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Input.java index b46b12c5..69f1e6cf 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Input.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Input.java @@ -197,7 +197,9 @@ public com.google.protobuf.ByteString getKeyBytes() { *
    * URI of the media. Input files must be at least 5 seconds in duration and
    * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-   * If empty, the value will be populated from `Job.input_uri`.
+   * If empty, the value is populated from `Job.input_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 2; @@ -222,7 +224,9 @@ public java.lang.String getUri() { *
    * URI of the media. Input files must be at least 5 seconds in duration and
    * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-   * If empty, the value will be populated from `Job.input_uri`.
+   * If empty, the value is populated from `Job.input_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 2; @@ -769,7 +773,9 @@ public Builder setKeyBytes(com.google.protobuf.ByteString value) { *
      * URI of the media. Input files must be at least 5 seconds in duration and
      * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-     * If empty, the value will be populated from `Job.input_uri`.
+     * If empty, the value is populated from `Job.input_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 2; @@ -793,7 +799,9 @@ public java.lang.String getUri() { *
      * URI of the media. Input files must be at least 5 seconds in duration and
      * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-     * If empty, the value will be populated from `Job.input_uri`.
+     * If empty, the value is populated from `Job.input_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 2; @@ -817,7 +825,9 @@ public com.google.protobuf.ByteString getUriBytes() { *
      * URI of the media. Input files must be at least 5 seconds in duration and
      * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-     * If empty, the value will be populated from `Job.input_uri`.
+     * If empty, the value is populated from `Job.input_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 2; @@ -840,7 +850,9 @@ public Builder setUri(java.lang.String value) { *
      * URI of the media. Input files must be at least 5 seconds in duration and
      * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-     * If empty, the value will be populated from `Job.input_uri`.
+     * If empty, the value is populated from `Job.input_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 2; @@ -859,7 +871,9 @@ public Builder clearUri() { *
      * URI of the media. Input files must be at least 5 seconds in duration and
      * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-     * If empty, the value will be populated from `Job.input_uri`.
+     * If empty, the value is populated from `Job.input_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 2; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/InputOrBuilder.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/InputOrBuilder.java index aee33279..0e45b40c 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/InputOrBuilder.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/InputOrBuilder.java @@ -56,7 +56,9 @@ public interface InputOrBuilder *
    * URI of the media. Input files must be at least 5 seconds in duration and
    * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-   * If empty, the value will be populated from `Job.input_uri`.
+   * If empty, the value is populated from `Job.input_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 2; @@ -70,7 +72,9 @@ public interface InputOrBuilder *
    * URI of the media. Input files must be at least 5 seconds in duration and
    * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).
-   * If empty, the value will be populated from `Job.input_uri`.
+   * If empty, the value is populated from `Job.input_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 2; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Job.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Job.java index 4b36c631..f0c9c247 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Job.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Job.java @@ -63,6 +63,7 @@ private Job( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -175,6 +176,19 @@ private Job( ttlAfterCompletionDays_ = input.readInt32(); break; } + case 130: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } case 138: { com.google.rpc.Status.Builder subBuilder = null; @@ -215,6 +229,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_video_transcoder_v1_Job_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -537,7 +562,9 @@ public com.google.protobuf.ByteString getNameBytes() { * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -563,7 +590,9 @@ public java.lang.String getInputUri() { * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -591,7 +620,9 @@ public com.google.protobuf.ByteString getInputUriBytes() { *
    * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
    * `JobTemplate.config.output.uri` when using template.
-   * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+   * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -616,7 +647,9 @@ public java.lang.String getOutputUri() { *
    * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
    * `JobTemplate.config.output.uri` when using template.
-   * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+   * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -981,6 +1014,108 @@ public int getTtlAfterCompletionDays() { return ttlAfterCompletionDays_; } + public static final int LABELS_FIELD_NUMBER = 16; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.video.transcoder.v1.ResourcesProto + .internal_static_google_cloud_video_transcoder_v1_Job_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public static final int ERROR_FIELD_NUMBER = 17; private com.google.rpc.Status error_; /** @@ -1076,6 +1211,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ttlAfterCompletionDays_ != 0) { output.writeInt32(15, ttlAfterCompletionDays_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 16); if (error_ != null) { output.writeMessage(17, getError()); } @@ -1122,6 +1259,16 @@ public int getSerializedSize() { if (ttlAfterCompletionDays_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(15, ttlAfterCompletionDays_); } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, labels__); + } if (error_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getError()); } @@ -1157,6 +1304,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEndTime().equals(other.getEndTime())) return false; } if (getTtlAfterCompletionDays() != other.getTtlAfterCompletionDays()) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (hasError() != other.hasError()) return false; if (hasError()) { if (!getError().equals(other.getError())) return false; @@ -1205,6 +1353,10 @@ public int hashCode() { } hash = (37 * hash) + TTL_AFTER_COMPLETION_DAYS_FIELD_NUMBER; hash = (53 * hash) + getTtlAfterCompletionDays(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } if (hasError()) { hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); @@ -1339,6 +1491,26 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_video_transcoder_v1_Job_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 16: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -1394,6 +1566,7 @@ public Builder clear() { } ttlAfterCompletionDays_ = 0; + internalGetMutableLabels().clear(); if (errorBuilder_ == null) { error_ = null; } else { @@ -1429,6 +1602,7 @@ public com.google.cloud.video.transcoder.v1.Job build() { public com.google.cloud.video.transcoder.v1.Job buildPartial() { com.google.cloud.video.transcoder.v1.Job result = new com.google.cloud.video.transcoder.v1.Job(this); + int from_bitField0_ = bitField0_; result.name_ = name_; result.inputUri_ = inputUri_; result.outputUri_ = outputUri_; @@ -1459,6 +1633,8 @@ public com.google.cloud.video.transcoder.v1.Job buildPartial() { result.endTime_ = endTimeBuilder_.build(); } result.ttlAfterCompletionDays_ = ttlAfterCompletionDays_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); if (errorBuilder_ == null) { result.error_ = error_; } else { @@ -1541,6 +1717,7 @@ public Builder mergeFrom(com.google.cloud.video.transcoder.v1.Job other) { if (other.getTtlAfterCompletionDays() != 0) { setTtlAfterCompletionDays(other.getTtlAfterCompletionDays()); } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); if (other.hasError()) { mergeError(other.getError()); } @@ -1605,6 +1782,8 @@ public Builder clearJobConfig() { return this; } + private int bitField0_; + private java.lang.Object name_ = ""; /** * @@ -1724,7 +1903,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1749,7 +1930,9 @@ public java.lang.String getInputUri() { * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1774,7 +1957,9 @@ public com.google.protobuf.ByteString getInputUriBytes() { * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1798,7 +1983,9 @@ public Builder setInputUri(java.lang.String value) { * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1818,7 +2005,9 @@ public Builder clearInputUri() { * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1844,7 +2033,9 @@ public Builder setInputUriBytes(com.google.protobuf.ByteString value) { *
      * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
      * `JobTemplate.config.output.uri` when using template.
-     * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+     * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1868,7 +2059,9 @@ public java.lang.String getOutputUri() { *
      * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
      * `JobTemplate.config.output.uri` when using template.
-     * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+     * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1892,7 +2085,9 @@ public com.google.protobuf.ByteString getOutputUriBytes() { *
      * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
      * `JobTemplate.config.output.uri` when using template.
-     * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+     * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1915,7 +2110,9 @@ public Builder setOutputUri(java.lang.String value) { *
      * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
      * `JobTemplate.config.output.uri` when using template.
-     * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+     * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -1934,7 +2131,9 @@ public Builder clearOutputUri() { *
      * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
      * `JobTemplate.config.output.uri` when using template.
-     * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+     * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -3074,6 +3273,171 @@ public Builder clearTtlAfterCompletionDays() { return this; } + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels associated with this job. You can use these to organize and
+     * group your jobs.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels associated with this job. You can use these to organize and
+     * group your jobs.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels associated with this job. You can use these to organize and
+     * group your jobs.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels associated with this job. You can use these to organize and
+     * group your jobs.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels associated with this job. You can use these to organize and
+     * group your jobs.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels associated with this job. You can use these to organize and
+     * group your jobs.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels associated with this job. You can use these to organize and
+     * group your jobs.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + private com.google.rpc.Status error_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfig.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfig.java index 010961f7..f6b94d8e 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfig.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfig.java @@ -802,6 +802,7 @@ public com.google.cloud.video.transcoder.v1.PubsubDestination getPubsubDestinati * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -815,6 +816,7 @@ public java.util.List getSprit * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -829,6 +831,7 @@ public java.util.List getSprit * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -842,6 +845,7 @@ public int getSpriteSheetsCount() { * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -855,6 +859,7 @@ public com.google.cloud.video.transcoder.v1.SpriteSheet getSpriteSheets(int inde * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4298,6 +4303,7 @@ private void ensureSpriteSheetsIsMutable() { * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4314,6 +4320,7 @@ public java.util.List getSprit * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4330,6 +4337,7 @@ public int getSpriteSheetsCount() { * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4346,6 +4354,7 @@ public com.google.cloud.video.transcoder.v1.SpriteSheet getSpriteSheets(int inde * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4369,6 +4378,7 @@ public Builder setSpriteSheets( * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4389,6 +4399,7 @@ public Builder setSpriteSheets( * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4411,6 +4422,7 @@ public Builder addSpriteSheets(com.google.cloud.video.transcoder.v1.SpriteSheet * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4434,6 +4446,7 @@ public Builder addSpriteSheets( * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4454,6 +4467,7 @@ public Builder addSpriteSheets( * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4474,6 +4488,7 @@ public Builder addSpriteSheets( * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4494,6 +4509,7 @@ public Builder addAllSpriteSheets( * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4513,6 +4529,7 @@ public Builder clearSpriteSheets() { * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4532,6 +4549,7 @@ public Builder removeSpriteSheets(int index) { * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4545,6 +4563,7 @@ public com.google.cloud.video.transcoder.v1.SpriteSheet.Builder getSpriteSheetsB * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4562,6 +4581,7 @@ public com.google.cloud.video.transcoder.v1.SpriteSheetOrBuilder getSpriteSheets * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4579,6 +4599,7 @@ public com.google.cloud.video.transcoder.v1.SpriteSheetOrBuilder getSpriteSheets * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4592,6 +4613,7 @@ public com.google.cloud.video.transcoder.v1.SpriteSheet.Builder addSpriteSheetsB * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -4606,6 +4628,7 @@ public com.google.cloud.video.transcoder.v1.SpriteSheet.Builder addSpriteSheetsB * *
      * List of output sprite sheets.
+     * Spritesheets require at least one VideoStream in the Jobconfig.
      * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfigOrBuilder.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfigOrBuilder.java index e0e4118e..f9b3340a 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfigOrBuilder.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobConfigOrBuilder.java @@ -426,6 +426,7 @@ com.google.cloud.video.transcoder.v1.ElementaryStreamOrBuilder getElementaryStre * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -436,6 +437,7 @@ com.google.cloud.video.transcoder.v1.ElementaryStreamOrBuilder getElementaryStre * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -446,6 +448,7 @@ com.google.cloud.video.transcoder.v1.ElementaryStreamOrBuilder getElementaryStre * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -456,6 +459,7 @@ com.google.cloud.video.transcoder.v1.ElementaryStreamOrBuilder getElementaryStre * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; @@ -467,6 +471,7 @@ com.google.cloud.video.transcoder.v1.ElementaryStreamOrBuilder getElementaryStre * *
    * List of output sprite sheets.
+   * Spritesheets require at least one VideoStream in the Jobconfig.
    * 
* * repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobOrBuilder.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobOrBuilder.java index 3ddaa5a4..9332dafb 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobOrBuilder.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobOrBuilder.java @@ -57,7 +57,9 @@ public interface JobOrBuilder * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -72,7 +74,9 @@ public interface JobOrBuilder * Input only. Specify the `input_uri` to populate empty `uri` fields in each element of * `Job.config.inputs` or `JobTemplate.config.inputs` when using template. * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). * * * string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -87,7 +91,9 @@ public interface JobOrBuilder *
    * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
    * `JobTemplate.config.output.uri` when using template.
-   * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+   * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -101,7 +107,9 @@ public interface JobOrBuilder *
    * Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
    * `JobTemplate.config.output.uri` when using template.
-   * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
+   * URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; @@ -355,6 +363,70 @@ public interface JobOrBuilder */ int getTtlAfterCompletionDays(); + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels associated with this job. You can use these to organize and
+   * group your jobs.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + /** * * diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplate.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplate.java index bc83033a..c8534364 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplate.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplate.java @@ -60,6 +60,7 @@ private JobTemplate( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -91,6 +92,19 @@ private JobTemplate( config_ = subBuilder.buildPartial(); } + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); break; } default: @@ -119,6 +133,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_video_transcoder_v1_JobTemplate_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -230,6 +255,108 @@ public com.google.cloud.video.transcoder.v1.JobConfigOrBuilder getConfigOrBuilde return getConfig(); } + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.video.transcoder.v1.ResourcesProto + .internal_static_google_cloud_video_transcoder_v1_JobTemplate_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -250,6 +377,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (config_ != null) { output.writeMessage(2, getConfig()); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); unknownFields.writeTo(output); } @@ -265,6 +394,16 @@ public int getSerializedSize() { if (config_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfig()); } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -286,6 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (hasConfig()) { if (!getConfig().equals(other.getConfig())) return false; } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -303,6 +443,10 @@ public int hashCode() { hash = (37 * hash) + CONFIG_FIELD_NUMBER; hash = (53 * hash) + getConfig().hashCode(); } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -421,6 +565,26 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_video_transcoder_v1_JobTemplate_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -456,6 +620,7 @@ public Builder clear() { config_ = null; configBuilder_ = null; } + internalGetMutableLabels().clear(); return this; } @@ -483,12 +648,15 @@ public com.google.cloud.video.transcoder.v1.JobTemplate build() { public com.google.cloud.video.transcoder.v1.JobTemplate buildPartial() { com.google.cloud.video.transcoder.v1.JobTemplate result = new com.google.cloud.video.transcoder.v1.JobTemplate(this); + int from_bitField0_ = bitField0_; result.name_ = name_; if (configBuilder_ == null) { result.config_ = config_; } else { result.config_ = configBuilder_.build(); } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); onBuilt(); return result; } @@ -546,6 +714,7 @@ public Builder mergeFrom(com.google.cloud.video.transcoder.v1.JobTemplate other) if (other.hasConfig()) { mergeConfig(other.getConfig()); } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -575,6 +744,8 @@ public Builder mergeFrom( return this; } + private int bitField0_; + private java.lang.Object name_ = ""; /** * @@ -877,6 +1048,171 @@ public com.google.cloud.video.transcoder.v1.JobConfigOrBuilder getConfigOrBuilde return configBuilder_; } + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels associated with this job template. You can use these to organize
+     * and group your job templates.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels associated with this job template. You can use these to organize
+     * and group your job templates.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels associated with this job template. You can use these to organize
+     * and group your job templates.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels associated with this job template. You can use these to organize
+     * and group your job templates.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels associated with this job template. You can use these to organize
+     * and group your job templates.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels associated with this job template. You can use these to organize
+     * and group your job templates.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels associated with this job template. You can use these to organize
+     * and group your job templates.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplateOrBuilder.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplateOrBuilder.java index 0d8decfc..e6f5790e 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplateOrBuilder.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/JobTemplateOrBuilder.java @@ -86,4 +86,68 @@ public interface JobTemplateOrBuilder * .google.cloud.video.transcoder.v1.JobConfig config = 2; */ com.google.cloud.video.transcoder.v1.JobConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels associated with this job template. You can use these to organize
+   * and group your job templates.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); } diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStream.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStream.java index ac79d383..17c19dc3 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStream.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStream.java @@ -279,6 +279,9 @@ public com.google.protobuf.ByteString getFileNameBytes() { * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; @@ -307,6 +310,9 @@ public java.lang.String getContainer() { * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; @@ -1091,6 +1097,9 @@ public Builder setFileNameBytes(com.google.protobuf.ByteString value) { * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; @@ -1118,6 +1127,9 @@ public java.lang.String getContainer() { * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; @@ -1145,6 +1157,9 @@ public com.google.protobuf.ByteString getContainerBytes() { * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; @@ -1171,6 +1186,9 @@ public Builder setContainer(java.lang.String value) { * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; @@ -1193,6 +1211,9 @@ public Builder clearContainer() { * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStreamOrBuilder.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStreamOrBuilder.java index f188cda7..97fbf3b1 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStreamOrBuilder.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/MuxStreamOrBuilder.java @@ -91,6 +91,9 @@ public interface MuxStreamOrBuilder * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; @@ -108,6 +111,9 @@ public interface MuxStreamOrBuilder * - `fmp4`- the corresponding file extension is `.m4s` * - `mp4` * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) * * * string container = 3; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Output.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Output.java index 5f5384fa..d65db3fa 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Output.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Output.java @@ -120,7 +120,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-   * If empty the value is populated from `Job.output_uri`.
+   * If empty, the value is populated from `Job.output_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 1; @@ -144,7 +146,9 @@ public java.lang.String getUri() { * *
    * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-   * If empty the value is populated from `Job.output_uri`.
+   * If empty, the value is populated from `Job.output_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 1; @@ -486,7 +490,9 @@ public Builder mergeFrom( * *
      * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-     * If empty the value is populated from `Job.output_uri`.
+     * If empty, the value is populated from `Job.output_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 1; @@ -509,7 +515,9 @@ public java.lang.String getUri() { * *
      * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-     * If empty the value is populated from `Job.output_uri`.
+     * If empty, the value is populated from `Job.output_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 1; @@ -532,7 +540,9 @@ public com.google.protobuf.ByteString getUriBytes() { * *
      * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-     * If empty the value is populated from `Job.output_uri`.
+     * If empty, the value is populated from `Job.output_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 1; @@ -554,7 +564,9 @@ public Builder setUri(java.lang.String value) { * *
      * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-     * If empty the value is populated from `Job.output_uri`.
+     * If empty, the value is populated from `Job.output_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 1; @@ -572,7 +584,9 @@ public Builder clearUri() { * *
      * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-     * If empty the value is populated from `Job.output_uri`.
+     * If empty, the value is populated from `Job.output_uri`. See
+     * [Supported input and output
+     * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
      * 
* * string uri = 1; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/OutputOrBuilder.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/OutputOrBuilder.java index 33311bdb..7542cc52 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/OutputOrBuilder.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/OutputOrBuilder.java @@ -28,7 +28,9 @@ public interface OutputOrBuilder * *
    * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-   * If empty the value is populated from `Job.output_uri`.
+   * If empty, the value is populated from `Job.output_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 1; @@ -41,7 +43,9 @@ public interface OutputOrBuilder * *
    * URI for the output file(s). For example, `gs://my-bucket/outputs/`.
-   * If empty the value is populated from `Job.output_uri`.
+   * If empty, the value is populated from `Job.output_uri`. See
+   * [Supported input and output
+   * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
    * 
* * string uri = 1; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/PreprocessingConfig.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/PreprocessingConfig.java index 86783072..6e3b3283 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/PreprocessingConfig.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/PreprocessingConfig.java @@ -267,6 +267,7 @@ public interface ColorOrBuilder * *
    * Color preprocessing configuration.
+   * **Note:** This configuration is not supported.
    * 
* * Protobuf type {@code google.cloud.video.transcoder.v1.PreprocessingConfig.Color} @@ -619,6 +620,7 @@ protected Builder newBuilderForType( * *
      * Color preprocessing configuration.
+     * **Note:** This configuration is not supported.
      * 
* * Protobuf type {@code google.cloud.video.transcoder.v1.PreprocessingConfig.Color} @@ -1075,6 +1077,7 @@ public interface DenoiseOrBuilder * *
    * Denoise preprocessing configuration.
+   * **Note:** This configuration is not supported.
    * 
* * Protobuf type {@code google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise} @@ -1424,6 +1427,7 @@ protected Builder newBuilderForType( * *
      * Denoise preprocessing configuration.
+     * **Note:** This configuration is not supported.
      * 
* * Protobuf type {@code google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise} @@ -1863,6 +1867,7 @@ public interface DeblockOrBuilder * *
    * Deblock preprocessing configuration.
+   * **Note:** This configuration is not supported.
    * 
* * Protobuf type {@code google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock} @@ -2172,6 +2177,7 @@ protected Builder newBuilderForType( * *
      * Deblock preprocessing configuration.
+     * **Note:** This configuration is not supported.
      * 
* * Protobuf type {@code google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock} @@ -2538,6 +2544,7 @@ public interface AudioOrBuilder * *
      * Enable boosting high frequency components. The default is `false`.
+     * **Note:** This field is not supported.
      * 
* * bool high_boost = 2; @@ -2551,6 +2558,7 @@ public interface AudioOrBuilder * *
      * Enable boosting low frequency components. The default is `false`.
+     * **Note:** This field is not supported.
      * 
* * bool low_boost = 3; @@ -2694,6 +2702,7 @@ public double getLufs() { * *
      * Enable boosting high frequency components. The default is `false`.
+     * **Note:** This field is not supported.
      * 
* * bool high_boost = 2; @@ -2712,6 +2721,7 @@ public boolean getHighBoost() { * *
      * Enable boosting low frequency components. The default is `false`.
+     * **Note:** This field is not supported.
      * 
* * bool low_boost = 3; @@ -3167,6 +3177,7 @@ public Builder clearLufs() { * *
        * Enable boosting high frequency components. The default is `false`.
+       * **Note:** This field is not supported.
        * 
* * bool high_boost = 2; @@ -3182,6 +3193,7 @@ public boolean getHighBoost() { * *
        * Enable boosting high frequency components. The default is `false`.
+       * **Note:** This field is not supported.
        * 
* * bool high_boost = 2; @@ -3200,6 +3212,7 @@ public Builder setHighBoost(boolean value) { * *
        * Enable boosting high frequency components. The default is `false`.
+       * **Note:** This field is not supported.
        * 
* * bool high_boost = 2; @@ -3219,6 +3232,7 @@ public Builder clearHighBoost() { * *
        * Enable boosting low frequency components. The default is `false`.
+       * **Note:** This field is not supported.
        * 
* * bool low_boost = 3; @@ -3234,6 +3248,7 @@ public boolean getLowBoost() { * *
        * Enable boosting low frequency components. The default is `false`.
+       * **Note:** This field is not supported.
        * 
* * bool low_boost = 3; @@ -3252,6 +3267,7 @@ public Builder setLowBoost(boolean value) { * *
        * Enable boosting low frequency components. The default is `false`.
+       * **Note:** This field is not supported.
        * 
* * bool low_boost = 3; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/ResourcesProto.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/ResourcesProto.java index 138a8ff9..aaea233f 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/ResourcesProto.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/ResourcesProto.java @@ -31,10 +31,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_video_transcoder_v1_Job_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_video_transcoder_v1_Job_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_video_transcoder_v1_Job_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_video_transcoder_v1_Job_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_video_transcoder_v1_JobTemplate_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_video_transcoder_v1_JobTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_video_transcoder_v1_JobTemplate_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_video_transcoder_v1_JobTemplate_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_video_transcoder_v1_JobConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -181,7 +189,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "r.v1\032\037google/api/field_behavior.proto\032\031g" + "oogle/api/resource.proto\032\036google/protobu" + "f/duration.proto\032\037google/protobuf/timest" - + "amp.proto\032\027google/rpc/status.proto\"\243\005\n\003J" + + "amp.proto\032\027google/rpc/status.proto\"\225\006\n\003J" + "ob\022\014\n\004name\030\001 \001(\t\022\026\n\tinput_uri\030\002 \001(\tB\003\340A\004" + "\022\027\n\noutput_uri\030\003 \001(\tB\003\340A\004\022\032\n\013template_id" + "\030\004 \001(\tB\003\340A\004H\000\022=\n\006config\030\005 \001(\0132+.google.c" @@ -192,181 +200,187 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "B\003\340A\003\0223\n\nstart_time\030\r \001(\0132\032.google.proto" + "buf.TimestampB\003\340A\003\0221\n\010end_time\030\016 \001(\0132\032.g" + "oogle.protobuf.TimestampB\003\340A\003\022!\n\031ttl_aft" - + "er_completion_days\030\017 \001(\005\022&\n\005error\030\021 \001(\0132" - + "\022.google.rpc.StatusB\003\340A\003\"h\n\017ProcessingSt" - + "ate\022 \n\034PROCESSING_STATE_UNSPECIFIED\020\000\022\013\n" - + "\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\n" - + "\n\006FAILED\020\004:V\352AS\n\035transcoder.googleapis.c" - + "om/Job\0222projects/{project}/locations/{lo" - + "cation}/jobs/{job}B\014\n\njob_config\"\311\001\n\013Job" - + "Template\022\014\n\004name\030\001 \001(\t\022;\n\006config\030\002 \001(\0132+" - + ".google.cloud.video.transcoder.v1.JobCon" - + "fig:o\352Al\n%transcoder.googleapis.com/JobT" - + "emplate\022Cprojects/{project}/locations/{l" - + "ocation}/jobTemplates/{job_template}\"\240\005\n" - + "\tJobConfig\0227\n\006inputs\030\001 \003(\0132\'.google.clou" - + "d.video.transcoder.v1.Input\022=\n\tedit_list" - + "\030\002 \003(\0132*.google.cloud.video.transcoder.v" - + "1.EditAtom\022N\n\022elementary_streams\030\003 \003(\01322" - + ".google.cloud.video.transcoder.v1.Elemen" - + "taryStream\022@\n\013mux_streams\030\004 \003(\0132+.google" - + ".cloud.video.transcoder.v1.MuxStream\022=\n\t" - + "manifests\030\005 \003(\0132*.google.cloud.video.tra" - + "nscoder.v1.Manifest\0228\n\006output\030\006 \001(\0132(.go" - + "ogle.cloud.video.transcoder.v1.Output\022<\n" - + "\tad_breaks\030\007 \003(\0132).google.cloud.video.tr" - + "anscoder.v1.AdBreak\022O\n\022pubsub_destinatio" - + "n\030\010 \001(\01323.google.cloud.video.transcoder." - + "v1.PubsubDestination\022D\n\rsprite_sheets\030\t " - + "\003(\0132-.google.cloud.video.transcoder.v1.S" - + "priteSheet\022;\n\010overlays\030\n \003(\0132).google.cl" - + "oud.video.transcoder.v1.Overlay\"v\n\005Input" - + "\022\013\n\003key\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022S\n\024preprocess" - + "ing_config\030\003 \001(\01325.google.cloud.video.tr" - + "anscoder.v1.PreprocessingConfig\"\025\n\006Outpu" - + "t\022\013\n\003uri\030\001 \001(\t\"\221\001\n\010EditAtom\022\013\n\003key\030\001 \001(\t" - + "\022\016\n\006inputs\030\002 \003(\t\0222\n\017end_time_offset\030\003 \001(" - + "\0132\031.google.protobuf.Duration\0224\n\021start_ti" - + "me_offset\030\004 \001(\0132\031.google.protobuf.Durati" - + "on\"?\n\007AdBreak\0224\n\021start_time_offset\030\001 \001(\013" - + "2\031.google.protobuf.Duration\"\207\002\n\020Elementa" - + "ryStream\022\013\n\003key\030\004 \001(\t\022E\n\014video_stream\030\001 " - + "\001(\0132-.google.cloud.video.transcoder.v1.V" - + "ideoStreamH\000\022E\n\014audio_stream\030\002 \001(\0132-.goo" - + "gle.cloud.video.transcoder.v1.AudioStrea" - + "mH\000\022C\n\013text_stream\030\003 \001(\0132,.google.cloud." - + "video.transcoder.v1.TextStreamH\000B\023\n\021elem" - + "entary_stream\"\247\001\n\tMuxStream\022\013\n\003key\030\001 \001(\t" - + "\022\021\n\tfile_name\030\002 \001(\t\022\021\n\tcontainer\030\003 \001(\t\022\032" - + "\n\022elementary_streams\030\004 \003(\t\022K\n\020segment_se" - + "ttings\030\005 \001(\01321.google.cloud.video.transc" - + "oder.v1.SegmentSettings\"\305\001\n\010Manifest\022\021\n\t" - + "file_name\030\001 \001(\t\022J\n\004type\030\002 \001(\01627.google.c" - + "loud.video.transcoder.v1.Manifest.Manife" - + "stTypeB\003\340A\002\022\030\n\013mux_streams\030\003 \003(\tB\003\340A\002\"@\n" - + "\014ManifestType\022\035\n\031MANIFEST_TYPE_UNSPECIFI" - + "ED\020\000\022\007\n\003HLS\020\001\022\010\n\004DASH\020\002\"\"\n\021PubsubDestina" - + "tion\022\r\n\005topic\030\001 \001(\t\"\375\002\n\013SpriteSheet\022\016\n\006f" - + "ormat\030\001 \001(\t\022\030\n\013file_prefix\030\002 \001(\tB\003\340A\002\022 \n" - + "\023sprite_width_pixels\030\003 \001(\005B\003\340A\002\022!\n\024sprit" - + "e_height_pixels\030\004 \001(\005B\003\340A\002\022\024\n\014column_cou" - + "nt\030\005 \001(\005\022\021\n\trow_count\030\006 \001(\005\0224\n\021start_tim" - + "e_offset\030\007 \001(\0132\031.google.protobuf.Duratio" - + "n\0222\n\017end_time_offset\030\010 \001(\0132\031.google.prot" - + "obuf.Duration\022\025\n\013total_count\030\t \001(\005H\000\022-\n\010" - + "interval\030\n \001(\0132\031.google.protobuf.Duratio" - + "nH\000\022\017\n\007quality\030\013 \001(\005B\025\n\023extraction_strat" - + "egy\"\213\t\n\007Overlay\022>\n\005image\030\001 \001(\0132/.google." - + "cloud.video.transcoder.v1.Overlay.Image\022" - + "G\n\nanimations\030\002 \003(\01323.google.cloud.video" - + ".transcoder.v1.Overlay.Animation\032,\n\024Norm" - + "alizedCoordinate\022\t\n\001x\030\001 \001(\001\022\t\n\001y\030\002 \001(\001\032|" - + "\n\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022R\n\nresolution\030" - + "\002 \001(\0132>.google.cloud.video.transcoder.v1" - + ".Overlay.NormalizedCoordinate\022\r\n\005alpha\030\003" - + " \001(\001\032\223\001\n\017AnimationStatic\022J\n\002xy\030\001 \001(\0132>.g" - + "oogle.cloud.video.transcoder.v1.Overlay." - + "NormalizedCoordinate\0224\n\021start_time_offse" - + "t\030\002 \001(\0132\031.google.protobuf.Duration\032\221\002\n\rA" - + "nimationFade\022J\n\tfade_type\030\001 \001(\01622.google" - + ".cloud.video.transcoder.v1.Overlay.FadeT" - + "ypeB\003\340A\002\022J\n\002xy\030\002 \001(\0132>.google.cloud.vide" - + "o.transcoder.v1.Overlay.NormalizedCoordi" - + "nate\0224\n\021start_time_offset\030\003 \001(\0132\031.google" - + ".protobuf.Duration\0222\n\017end_time_offset\030\004 " - + "\001(\0132\031.google.protobuf.Duration\032D\n\014Animat" - + "ionEnd\0224\n\021start_time_offset\030\001 \001(\0132\031.goog" - + "le.protobuf.Duration\032\230\002\n\tAnimation\022U\n\020an" - + "imation_static\030\001 \001(\01329.google.cloud.vide" - + "o.transcoder.v1.Overlay.AnimationStaticH" - + "\000\022Q\n\016animation_fade\030\002 \001(\01327.google.cloud" - + ".video.transcoder.v1.Overlay.AnimationFa" - + "deH\000\022O\n\ranimation_end\030\003 \001(\01326.google.clo" - + "ud.video.transcoder.v1.Overlay.Animation" - + "EndH\000B\020\n\016animation_type\"@\n\010FadeType\022\031\n\025F" - + "ADE_TYPE_UNSPECIFIED\020\000\022\013\n\007FADE_IN\020\001\022\014\n\010F" - + "ADE_OUT\020\002\"\364\006\n\023PreprocessingConfig\022J\n\005col" - + "or\030\001 \001(\0132;.google.cloud.video.transcoder" - + ".v1.PreprocessingConfig.Color\022N\n\007denoise" - + "\030\002 \001(\0132=.google.cloud.video.transcoder.v" - + "1.PreprocessingConfig.Denoise\022N\n\007deblock" - + "\030\003 \001(\0132=.google.cloud.video.transcoder.v" - + "1.PreprocessingConfig.Deblock\022J\n\005audio\030\004" + + "er_completion_days\030\017 \001(\005\022A\n\006labels\030\020 \003(\013" + + "21.google.cloud.video.transcoder.v1.Job." + + "LabelsEntry\022&\n\005error\030\021 \001(\0132\022.google.rpc." + + "StatusB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\"h\n\017ProcessingState\022 \n" + + "\034PROCESSING_STATE_UNSPECIFIED\020\000\022\013\n\007PENDI" + + "NG\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006FAIL" + + "ED\020\004:V\352AS\n\035transcoder.googleapis.com/Job" + + "\0222projects/{project}/locations/{location" + + "}/jobs/{job}B\014\n\njob_config\"\303\002\n\013JobTempla" + + "te\022\014\n\004name\030\001 \001(\t\022;\n\006config\030\002 \001(\0132+.googl" + + "e.cloud.video.transcoder.v1.JobConfig\022I\n" + + "\006labels\030\003 \003(\01329.google.cloud.video.trans" + + "coder.v1.JobTemplate.LabelsEntry\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:" + + "o\352Al\n%transcoder.googleapis.com/JobTempl" + + "ate\022Cprojects/{project}/locations/{locat" + + "ion}/jobTemplates/{job_template}\"\240\005\n\tJob" + + "Config\0227\n\006inputs\030\001 \003(\0132\'.google.cloud.vi" + + "deo.transcoder.v1.Input\022=\n\tedit_list\030\002 \003" + + "(\0132*.google.cloud.video.transcoder.v1.Ed" + + "itAtom\022N\n\022elementary_streams\030\003 \003(\01322.goo" + + "gle.cloud.video.transcoder.v1.Elementary" + + "Stream\022@\n\013mux_streams\030\004 \003(\0132+.google.clo" + + "ud.video.transcoder.v1.MuxStream\022=\n\tmani" + + "fests\030\005 \003(\0132*.google.cloud.video.transco" + + "der.v1.Manifest\0228\n\006output\030\006 \001(\0132(.google" + + ".cloud.video.transcoder.v1.Output\022<\n\tad_" + + "breaks\030\007 \003(\0132).google.cloud.video.transc" + + "oder.v1.AdBreak\022O\n\022pubsub_destination\030\010 " + + "\001(\01323.google.cloud.video.transcoder.v1.P" + + "ubsubDestination\022D\n\rsprite_sheets\030\t \003(\0132" + + "-.google.cloud.video.transcoder.v1.Sprit" + + "eSheet\022;\n\010overlays\030\n \003(\0132).google.cloud." + + "video.transcoder.v1.Overlay\"v\n\005Input\022\013\n\003" + + "key\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022S\n\024preprocessing_" + + "config\030\003 \001(\01325.google.cloud.video.transc" + + "oder.v1.PreprocessingConfig\"\025\n\006Output\022\013\n" + + "\003uri\030\001 \001(\t\"\221\001\n\010EditAtom\022\013\n\003key\030\001 \001(\t\022\016\n\006" + + "inputs\030\002 \003(\t\0222\n\017end_time_offset\030\003 \001(\0132\031." + + "google.protobuf.Duration\0224\n\021start_time_o" + + "ffset\030\004 \001(\0132\031.google.protobuf.Duration\"?" + + "\n\007AdBreak\0224\n\021start_time_offset\030\001 \001(\0132\031.g" + + "oogle.protobuf.Duration\"\207\002\n\020ElementarySt" + + "ream\022\013\n\003key\030\004 \001(\t\022E\n\014video_stream\030\001 \001(\0132" + + "-.google.cloud.video.transcoder.v1.Video" + + "StreamH\000\022E\n\014audio_stream\030\002 \001(\0132-.google." + + "cloud.video.transcoder.v1.AudioStreamH\000\022" + + "C\n\013text_stream\030\003 \001(\0132,.google.cloud.vide" + + "o.transcoder.v1.TextStreamH\000B\023\n\021elementa" + + "ry_stream\"\247\001\n\tMuxStream\022\013\n\003key\030\001 \001(\t\022\021\n\t" + + "file_name\030\002 \001(\t\022\021\n\tcontainer\030\003 \001(\t\022\032\n\022el" + + "ementary_streams\030\004 \003(\t\022K\n\020segment_settin" + + "gs\030\005 \001(\01321.google.cloud.video.transcoder" + + ".v1.SegmentSettings\"\305\001\n\010Manifest\022\021\n\tfile" + + "_name\030\001 \001(\t\022J\n\004type\030\002 \001(\01627.google.cloud" + + ".video.transcoder.v1.Manifest.ManifestTy" + + "peB\003\340A\002\022\030\n\013mux_streams\030\003 \003(\tB\003\340A\002\"@\n\014Man" + + "ifestType\022\035\n\031MANIFEST_TYPE_UNSPECIFIED\020\000" + + "\022\007\n\003HLS\020\001\022\010\n\004DASH\020\002\"\"\n\021PubsubDestination" + + "\022\r\n\005topic\030\001 \001(\t\"\375\002\n\013SpriteSheet\022\016\n\006forma" + + "t\030\001 \001(\t\022\030\n\013file_prefix\030\002 \001(\tB\003\340A\002\022 \n\023spr" + + "ite_width_pixels\030\003 \001(\005B\003\340A\002\022!\n\024sprite_he" + + "ight_pixels\030\004 \001(\005B\003\340A\002\022\024\n\014column_count\030\005" + + " \001(\005\022\021\n\trow_count\030\006 \001(\005\0224\n\021start_time_of" + + "fset\030\007 \001(\0132\031.google.protobuf.Duration\0222\n" + + "\017end_time_offset\030\010 \001(\0132\031.google.protobuf" + + ".Duration\022\025\n\013total_count\030\t \001(\005H\000\022-\n\010inte" + + "rval\030\n \001(\0132\031.google.protobuf.DurationH\000\022" + + "\017\n\007quality\030\013 \001(\005B\025\n\023extraction_strategy\"" + + "\213\t\n\007Overlay\022>\n\005image\030\001 \001(\0132/.google.clou" + + "d.video.transcoder.v1.Overlay.Image\022G\n\na" + + "nimations\030\002 \003(\01323.google.cloud.video.tra" + + "nscoder.v1.Overlay.Animation\032,\n\024Normaliz" + + "edCoordinate\022\t\n\001x\030\001 \001(\001\022\t\n\001y\030\002 \001(\001\032|\n\005Im" + + "age\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022R\n\nresolution\030\002 \001(" + + "\0132>.google.cloud.video.transcoder.v1.Ove" + + "rlay.NormalizedCoordinate\022\r\n\005alpha\030\003 \001(\001" + + "\032\223\001\n\017AnimationStatic\022J\n\002xy\030\001 \001(\0132>.googl" + + "e.cloud.video.transcoder.v1.Overlay.Norm" + + "alizedCoordinate\0224\n\021start_time_offset\030\002 " + + "\001(\0132\031.google.protobuf.Duration\032\221\002\n\rAnima" + + "tionFade\022J\n\tfade_type\030\001 \001(\01622.google.clo" + + "ud.video.transcoder.v1.Overlay.FadeTypeB" + + "\003\340A\002\022J\n\002xy\030\002 \001(\0132>.google.cloud.video.tr" + + "anscoder.v1.Overlay.NormalizedCoordinate" + + "\0224\n\021start_time_offset\030\003 \001(\0132\031.google.pro" + + "tobuf.Duration\0222\n\017end_time_offset\030\004 \001(\0132" + + "\031.google.protobuf.Duration\032D\n\014AnimationE" + + "nd\0224\n\021start_time_offset\030\001 \001(\0132\031.google.p" + + "rotobuf.Duration\032\230\002\n\tAnimation\022U\n\020animat" + + "ion_static\030\001 \001(\01329.google.cloud.video.tr" + + "anscoder.v1.Overlay.AnimationStaticH\000\022Q\n" + + "\016animation_fade\030\002 \001(\01327.google.cloud.vid" + + "eo.transcoder.v1.Overlay.AnimationFadeH\000" + + "\022O\n\ranimation_end\030\003 \001(\01326.google.cloud.v" + + "ideo.transcoder.v1.Overlay.AnimationEndH" + + "\000B\020\n\016animation_type\"@\n\010FadeType\022\031\n\025FADE_" + + "TYPE_UNSPECIFIED\020\000\022\013\n\007FADE_IN\020\001\022\014\n\010FADE_" + + "OUT\020\002\"\364\006\n\023PreprocessingConfig\022J\n\005color\030\001" + " \001(\0132;.google.cloud.video.transcoder.v1." - + "PreprocessingConfig.Audio\022H\n\004crop\030\005 \001(\0132" - + ":.google.cloud.video.transcoder.v1.Prepr" - + "ocessingConfig.Crop\022F\n\003pad\030\006 \001(\01329.googl" - + "e.cloud.video.transcoder.v1.Preprocessin" - + "gConfig.Pad\032A\n\005Color\022\022\n\nsaturation\030\001 \001(\001" - + "\022\020\n\010contrast\030\002 \001(\001\022\022\n\nbrightness\030\003 \001(\001\032)" - + "\n\007Denoise\022\020\n\010strength\030\001 \001(\001\022\014\n\004tune\030\002 \001(" - + "\t\032,\n\007Deblock\022\020\n\010strength\030\001 \001(\001\022\017\n\007enable" - + "d\030\002 \001(\010\032<\n\005Audio\022\014\n\004lufs\030\001 \001(\001\022\022\n\nhigh_b" - + "oost\030\002 \001(\010\022\021\n\tlow_boost\030\003 \001(\010\032\\\n\004Crop\022\022\n" - + "\ntop_pixels\030\001 \001(\005\022\025\n\rbottom_pixels\030\002 \001(\005" - + "\022\023\n\013left_pixels\030\003 \001(\005\022\024\n\014right_pixels\030\004 " - + "\001(\005\032[\n\003Pad\022\022\n\ntop_pixels\030\001 \001(\005\022\025\n\rbottom" - + "_pixels\030\002 \001(\005\022\023\n\013left_pixels\030\003 \001(\005\022\024\n\014ri" - + "ght_pixels\030\004 \001(\005\"\225\014\n\013VideoStream\022O\n\004h264" - + "\030\001 \001(\0132?.google.cloud.video.transcoder.v" - + "1.VideoStream.H264CodecSettingsH\000\022O\n\004h26" - + "5\030\002 \001(\0132?.google.cloud.video.transcoder." - + "v1.VideoStream.H265CodecSettingsH\000\022M\n\003vp" - + "9\030\003 \001(\0132>.google.cloud.video.transcoder." - + "v1.VideoStream.Vp9CodecSettingsH\000\032\371\003\n\021H2" - + "64CodecSettings\022\024\n\014width_pixels\030\001 \001(\005\022\025\n" - + "\rheight_pixels\030\002 \001(\005\022\027\n\nframe_rate\030\003 \001(\001" - + "B\003\340A\002\022\030\n\013bitrate_bps\030\004 \001(\005B\003\340A\002\022\024\n\014pixel" - + "_format\030\005 \001(\t\022\031\n\021rate_control_mode\030\006 \001(\t" - + "\022\021\n\tcrf_level\030\007 \001(\005\022\026\n\016allow_open_gop\030\010 " - + "\001(\010\022\031\n\017gop_frame_count\030\t \001(\005H\000\0221\n\014gop_du" - + "ration\030\n \001(\0132\031.google.protobuf.DurationH" - + "\000\022\027\n\017enable_two_pass\030\013 \001(\010\022\025\n\rvbv_size_b" - + "its\030\014 \001(\005\022\031\n\021vbv_fullness_bits\030\r \001(\005\022\025\n\r" - + "entropy_coder\030\016 \001(\t\022\021\n\tb_pyramid\030\017 \001(\010\022\025" - + "\n\rb_frame_count\030\020 \001(\005\022\023\n\013aq_strength\030\021 \001" - + "(\001\022\017\n\007profile\030\022 \001(\t\022\014\n\004tune\030\023 \001(\t\022\016\n\006pre" - + "set\030\024 \001(\tB\n\n\010gop_mode\032\342\003\n\021H265CodecSetti" + + "PreprocessingConfig.Color\022N\n\007denoise\030\002 \001" + + "(\0132=.google.cloud.video.transcoder.v1.Pr" + + "eprocessingConfig.Denoise\022N\n\007deblock\030\003 \001" + + "(\0132=.google.cloud.video.transcoder.v1.Pr" + + "eprocessingConfig.Deblock\022J\n\005audio\030\004 \001(\013" + + "2;.google.cloud.video.transcoder.v1.Prep" + + "rocessingConfig.Audio\022H\n\004crop\030\005 \001(\0132:.go" + + "ogle.cloud.video.transcoder.v1.Preproces" + + "singConfig.Crop\022F\n\003pad\030\006 \001(\01329.google.cl" + + "oud.video.transcoder.v1.PreprocessingCon" + + "fig.Pad\032A\n\005Color\022\022\n\nsaturation\030\001 \001(\001\022\020\n\010" + + "contrast\030\002 \001(\001\022\022\n\nbrightness\030\003 \001(\001\032)\n\007De" + + "noise\022\020\n\010strength\030\001 \001(\001\022\014\n\004tune\030\002 \001(\t\032,\n" + + "\007Deblock\022\020\n\010strength\030\001 \001(\001\022\017\n\007enabled\030\002 " + + "\001(\010\032<\n\005Audio\022\014\n\004lufs\030\001 \001(\001\022\022\n\nhigh_boost" + + "\030\002 \001(\010\022\021\n\tlow_boost\030\003 \001(\010\032\\\n\004Crop\022\022\n\ntop" + + "_pixels\030\001 \001(\005\022\025\n\rbottom_pixels\030\002 \001(\005\022\023\n\013" + + "left_pixels\030\003 \001(\005\022\024\n\014right_pixels\030\004 \001(\005\032" + + "[\n\003Pad\022\022\n\ntop_pixels\030\001 \001(\005\022\025\n\rbottom_pix" + + "els\030\002 \001(\005\022\023\n\013left_pixels\030\003 \001(\005\022\024\n\014right_" + + "pixels\030\004 \001(\005\"\225\014\n\013VideoStream\022O\n\004h264\030\001 \001" + + "(\0132?.google.cloud.video.transcoder.v1.Vi" + + "deoStream.H264CodecSettingsH\000\022O\n\004h265\030\002 " + + "\001(\0132?.google.cloud.video.transcoder.v1.V" + + "ideoStream.H265CodecSettingsH\000\022M\n\003vp9\030\003 " + + "\001(\0132>.google.cloud.video.transcoder.v1.V" + + "ideoStream.Vp9CodecSettingsH\000\032\371\003\n\021H264Co" + + "decSettings\022\024\n\014width_pixels\030\001 \001(\005\022\025\n\rhei" + + "ght_pixels\030\002 \001(\005\022\027\n\nframe_rate\030\003 \001(\001B\003\340A" + + "\002\022\030\n\013bitrate_bps\030\004 \001(\005B\003\340A\002\022\024\n\014pixel_for" + + "mat\030\005 \001(\t\022\031\n\021rate_control_mode\030\006 \001(\t\022\021\n\t" + + "crf_level\030\007 \001(\005\022\026\n\016allow_open_gop\030\010 \001(\010\022" + + "\031\n\017gop_frame_count\030\t \001(\005H\000\0221\n\014gop_durati" + + "on\030\n \001(\0132\031.google.protobuf.DurationH\000\022\027\n" + + "\017enable_two_pass\030\013 \001(\010\022\025\n\rvbv_size_bits\030" + + "\014 \001(\005\022\031\n\021vbv_fullness_bits\030\r \001(\005\022\025\n\rentr" + + "opy_coder\030\016 \001(\t\022\021\n\tb_pyramid\030\017 \001(\010\022\025\n\rb_" + + "frame_count\030\020 \001(\005\022\023\n\013aq_strength\030\021 \001(\001\022\017" + + "\n\007profile\030\022 \001(\t\022\014\n\004tune\030\023 \001(\t\022\016\n\006preset\030" + + "\024 \001(\tB\n\n\010gop_mode\032\342\003\n\021H265CodecSettings\022" + + "\024\n\014width_pixels\030\001 \001(\005\022\025\n\rheight_pixels\030\002" + + " \001(\005\022\027\n\nframe_rate\030\003 \001(\001B\003\340A\002\022\030\n\013bitrate" + + "_bps\030\004 \001(\005B\003\340A\002\022\024\n\014pixel_format\030\005 \001(\t\022\031\n" + + "\021rate_control_mode\030\006 \001(\t\022\021\n\tcrf_level\030\007 " + + "\001(\005\022\026\n\016allow_open_gop\030\010 \001(\010\022\031\n\017gop_frame" + + "_count\030\t \001(\005H\000\0221\n\014gop_duration\030\n \001(\0132\031.g" + + "oogle.protobuf.DurationH\000\022\027\n\017enable_two_" + + "pass\030\013 \001(\010\022\025\n\rvbv_size_bits\030\014 \001(\005\022\031\n\021vbv" + + "_fullness_bits\030\r \001(\005\022\021\n\tb_pyramid\030\016 \001(\010\022" + + "\025\n\rb_frame_count\030\017 \001(\005\022\023\n\013aq_strength\030\020 " + + "\001(\001\022\017\n\007profile\030\021 \001(\t\022\014\n\004tune\030\022 \001(\t\022\016\n\006pr" + + "eset\030\023 \001(\tB\n\n\010gop_mode\032\241\002\n\020Vp9CodecSetti" + "ngs\022\024\n\014width_pixels\030\001 \001(\005\022\025\n\rheight_pixe" + "ls\030\002 \001(\005\022\027\n\nframe_rate\030\003 \001(\001B\003\340A\002\022\030\n\013bit" + "rate_bps\030\004 \001(\005B\003\340A\002\022\024\n\014pixel_format\030\005 \001(" + "\t\022\031\n\021rate_control_mode\030\006 \001(\t\022\021\n\tcrf_leve" - + "l\030\007 \001(\005\022\026\n\016allow_open_gop\030\010 \001(\010\022\031\n\017gop_f" - + "rame_count\030\t \001(\005H\000\0221\n\014gop_duration\030\n \001(\013" - + "2\031.google.protobuf.DurationH\000\022\027\n\017enable_" - + "two_pass\030\013 \001(\010\022\025\n\rvbv_size_bits\030\014 \001(\005\022\031\n" - + "\021vbv_fullness_bits\030\r \001(\005\022\021\n\tb_pyramid\030\016 " - + "\001(\010\022\025\n\rb_frame_count\030\017 \001(\005\022\023\n\013aq_strengt" - + "h\030\020 \001(\001\022\017\n\007profile\030\021 \001(\t\022\014\n\004tune\030\022 \001(\t\022\016" - + "\n\006preset\030\023 \001(\tB\n\n\010gop_mode\032\241\002\n\020Vp9CodecS" - + "ettings\022\024\n\014width_pixels\030\001 \001(\005\022\025\n\rheight_" - + "pixels\030\002 \001(\005\022\027\n\nframe_rate\030\003 \001(\001B\003\340A\002\022\030\n" - + "\013bitrate_bps\030\004 \001(\005B\003\340A\002\022\024\n\014pixel_format\030" - + "\005 \001(\t\022\031\n\021rate_control_mode\030\006 \001(\t\022\021\n\tcrf_" - + "level\030\007 \001(\005\022\031\n\017gop_frame_count\030\010 \001(\005H\000\0221" - + "\n\014gop_duration\030\t \001(\0132\031.google.protobuf.D" - + "urationH\000\022\017\n\007profile\030\n \001(\tB\n\n\010gop_modeB\020" - + "\n\016codec_settings\"\361\002\n\013AudioStream\022\r\n\005code" - + "c\030\001 \001(\t\022\030\n\013bitrate_bps\030\002 \001(\005B\003\340A\002\022\025\n\rcha" - + "nnel_count\030\003 \001(\005\022\026\n\016channel_layout\030\004 \003(\t" - + "\022K\n\007mapping\030\005 \003(\0132:.google.cloud.video.t" - + "ranscoder.v1.AudioStream.AudioMapping\022\031\n" - + "\021sample_rate_hertz\030\006 \001(\005\032\241\001\n\014AudioMappin" - + "g\022\025\n\010atom_key\030\001 \001(\tB\003\340A\002\022\026\n\tinput_key\030\002 " - + "\001(\tB\003\340A\002\022\030\n\013input_track\030\003 \001(\005B\003\340A\002\022\032\n\rin" - + "put_channel\030\004 \001(\005B\003\340A\002\022\033\n\016output_channel" - + "\030\005 \001(\005B\003\340A\002\022\017\n\007gain_db\030\006 \001(\001\"\276\001\n\nTextStr" - + "eam\022\r\n\005codec\030\001 \001(\t\022I\n\007mapping\030\003 \003(\01328.go" - + "ogle.cloud.video.transcoder.v1.TextStrea" - + "m.TextMapping\032V\n\013TextMapping\022\025\n\010atom_key" - + "\030\001 \001(\tB\003\340A\002\022\026\n\tinput_key\030\002 \001(\tB\003\340A\002\022\030\n\013i" - + "nput_track\030\003 \001(\005B\003\340A\002\"h\n\017SegmentSettings" - + "\0223\n\020segment_duration\030\001 \001(\0132\031.google.prot" - + "obuf.Duration\022 \n\023individual_segments\030\003 \001" - + "(\010B\003\340A\002B\204\001\n$com.google.cloud.video.trans" - + "coder.v1B\016ResourcesProtoP\001ZJgoogle.golan" - + "g.org/genproto/googleapis/cloud/video/tr" - + "anscoder/v1;transcoderb\006proto3" + + "l\030\007 \001(\005\022\031\n\017gop_frame_count\030\010 \001(\005H\000\0221\n\014go" + + "p_duration\030\t \001(\0132\031.google.protobuf.Durat" + + "ionH\000\022\017\n\007profile\030\n \001(\tB\n\n\010gop_modeB\020\n\016co" + + "dec_settings\"\361\002\n\013AudioStream\022\r\n\005codec\030\001 " + + "\001(\t\022\030\n\013bitrate_bps\030\002 \001(\005B\003\340A\002\022\025\n\rchannel" + + "_count\030\003 \001(\005\022\026\n\016channel_layout\030\004 \003(\t\022K\n\007" + + "mapping\030\005 \003(\0132:.google.cloud.video.trans" + + "coder.v1.AudioStream.AudioMapping\022\031\n\021sam" + + "ple_rate_hertz\030\006 \001(\005\032\241\001\n\014AudioMapping\022\025\n" + + "\010atom_key\030\001 \001(\tB\003\340A\002\022\026\n\tinput_key\030\002 \001(\tB" + + "\003\340A\002\022\030\n\013input_track\030\003 \001(\005B\003\340A\002\022\032\n\rinput_" + + "channel\030\004 \001(\005B\003\340A\002\022\033\n\016output_channel\030\005 \001" + + "(\005B\003\340A\002\022\017\n\007gain_db\030\006 \001(\001\"\276\001\n\nTextStream\022" + + "\r\n\005codec\030\001 \001(\t\022I\n\007mapping\030\003 \003(\01328.google" + + ".cloud.video.transcoder.v1.TextStream.Te" + + "xtMapping\032V\n\013TextMapping\022\025\n\010atom_key\030\001 \001" + + "(\tB\003\340A\002\022\026\n\tinput_key\030\002 \001(\tB\003\340A\002\022\030\n\013input" + + "_track\030\003 \001(\005B\003\340A\002\"h\n\017SegmentSettings\0223\n\020" + + "segment_duration\030\001 \001(\0132\031.google.protobuf" + + ".Duration\022 \n\023individual_segments\030\003 \001(\010B\003" + + "\340A\002B\204\001\n$com.google.cloud.video.transcode" + + "r.v1B\016ResourcesProtoP\001ZJgoogle.golang.or" + + "g/genproto/googleapis/cloud/video/transc" + + "oder/v1;transcoderb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -394,16 +408,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartTime", "EndTime", "TtlAfterCompletionDays", + "Labels", "Error", "JobConfig", }); + internal_static_google_cloud_video_transcoder_v1_Job_LabelsEntry_descriptor = + internal_static_google_cloud_video_transcoder_v1_Job_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_video_transcoder_v1_Job_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_video_transcoder_v1_Job_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_video_transcoder_v1_JobTemplate_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_video_transcoder_v1_JobTemplate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_video_transcoder_v1_JobTemplate_descriptor, new java.lang.String[] { - "Name", "Config", + "Name", "Config", "Labels", + }); + internal_static_google_cloud_video_transcoder_v1_JobTemplate_LabelsEntry_descriptor = + internal_static_google_cloud_video_transcoder_v1_JobTemplate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_video_transcoder_v1_JobTemplate_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_video_transcoder_v1_JobTemplate_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); internal_static_google_cloud_video_transcoder_v1_JobConfig_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/VideoStream.java b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/VideoStream.java index 00e2d244..9cae2a48 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/VideoStream.java +++ b/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/VideoStream.java @@ -8171,7 +8171,6 @@ public interface Vp9CodecSettingsOrBuilder * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -8186,7 +8185,6 @@ public interface Vp9CodecSettingsOrBuilder * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -8201,6 +8199,7 @@ public interface Vp9CodecSettingsOrBuilder *
      * Target CRF level. Must be between 10 and 36, where 10 is the highest
      * quality and 36 is the most efficient compression. The default is 21.
+     * **Note:** This field is not supported.
      * 
* * int32 crf_level = 7; @@ -8696,7 +8695,6 @@ public com.google.protobuf.ByteString getPixelFormatBytes() { * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -8722,7 +8720,6 @@ public java.lang.String getRateControlMode() { * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -8750,6 +8747,7 @@ public com.google.protobuf.ByteString getRateControlModeBytes() { *
      * Target CRF level. Must be between 10 and 36, where 10 is the highest
      * quality and 36 is the most efficient compression. The default is 21.
+     * **Note:** This field is not supported.
      * 
* * int32 crf_level = 7; @@ -9859,7 +9857,6 @@ public Builder setPixelFormatBytes(com.google.protobuf.ByteString value) { * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -9884,7 +9881,6 @@ public java.lang.String getRateControlMode() { * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -9909,7 +9905,6 @@ public com.google.protobuf.ByteString getRateControlModeBytes() { * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -9933,7 +9928,6 @@ public Builder setRateControlMode(java.lang.String value) { * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -9953,7 +9947,6 @@ public Builder clearRateControlMode() { * Specify the `rate_control_mode`. The default is `vbr`. * Supported rate control modes: * - `vbr` - variable bitrate - * - `crf` - constant rate factor * * * string rate_control_mode = 6; @@ -9979,6 +9972,7 @@ public Builder setRateControlModeBytes(com.google.protobuf.ByteString value) { *
        * Target CRF level. Must be between 10 and 36, where 10 is the highest
        * quality and 36 is the most efficient compression. The default is 21.
+       * **Note:** This field is not supported.
        * 
* * int32 crf_level = 7; @@ -9995,6 +9989,7 @@ public int getCrfLevel() { *
        * Target CRF level. Must be between 10 and 36, where 10 is the highest
        * quality and 36 is the most efficient compression. The default is 21.
+       * **Note:** This field is not supported.
        * 
* * int32 crf_level = 7; @@ -10014,6 +10009,7 @@ public Builder setCrfLevel(int value) { *
        * Target CRF level. Must be between 10 and 36, where 10 is the highest
        * quality and 36 is the most efficient compression. The default is 21.
+       * **Note:** This field is not supported.
        * 
* * int32 crf_level = 7; diff --git a/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/resources.proto b/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/resources.proto index 42b9d62f..ce3824ba 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/resources.proto +++ b/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -60,12 +60,16 @@ message Job { // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of // `Job.config.inputs` or `JobTemplate.config.inputs` when using template. // URI of the media. Input files must be at least 5 seconds in duration and - // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY]; // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or // `JobTemplate.config.output.uri` when using template. - // URI for the output file(s). For example, `gs://my-bucket/outputs/`. + // URI for the output file(s). For example, `gs://my-bucket/outputs/`. See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY]; // Specify the `job_config` for the transcoding job. If you don't specify the @@ -104,6 +108,10 @@ message Job { // a value between 1 and 90. The default is 30. int32 ttl_after_completion_days = 15; + // The labels associated with this job. You can use these to organize and + // group your jobs. + map labels = 16; + // Output only. An error object that describes the reason for the failure. // This property is always present when `state` is `FAILED`. google.rpc.Status error = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -123,6 +131,10 @@ message JobTemplate { // The configuration for this template. JobConfig config = 2; + + // The labels associated with this job template. You can use these to organize + // and group your job templates. + map labels = 3; } // Job configuration @@ -154,6 +166,7 @@ message JobConfig { PubsubDestination pubsub_destination = 8; // List of output sprite sheets. + // Spritesheets require at least one VideoStream in the Jobconfig. repeated SpriteSheet sprite_sheets = 9; // List of overlays on the output video, in descending Z-order. @@ -168,7 +181,9 @@ message Input { // URI of the media. Input files must be at least 5 seconds in duration and // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - // If empty, the value will be populated from `Job.input_uri`. + // If empty, the value is populated from `Job.input_uri`. See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string uri = 2; // Preprocessing configurations. @@ -178,7 +193,9 @@ message Input { // Location of output file(s) in a Cloud Storage bucket. message Output { // URI for the output file(s). For example, `gs://my-bucket/outputs/`. - // If empty the value is populated from `Job.output_uri`. + // If empty, the value is populated from `Job.output_uri`. See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string uri = 1; } @@ -250,6 +267,10 @@ message MuxStream { // - `fmp4`- the corresponding file extension is `.m4s` // - `mp4` // - `vtt` + // + // See also: + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) string container = 3; // List of `ElementaryStream.key`s multiplexed in this stream. @@ -400,6 +421,18 @@ message Overlay { google.protobuf.Duration start_time_offset = 2; } + // Fade type for the overlay: `FADE_IN` or `FADE_OUT`. + enum FadeType { + // The fade type is not specified. + FADE_TYPE_UNSPECIFIED = 0; + + // Fade the overlay object into view. + FADE_IN = 1; + + // Fade the overlay object out of view. + FADE_OUT = 2; + } + // Display overlay object with fade animation. message AnimationFade { // Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. @@ -443,18 +476,6 @@ message Overlay { } } - // Fade type for the overlay: `FADE_IN` or `FADE_OUT`. - enum FadeType { - // The fade type is not specified. - FADE_TYPE_UNSPECIFIED = 0; - - // Fade the overlay object into view. - FADE_IN = 1; - - // Fade the overlay object out of view. - FADE_OUT = 2; - } - // Image overlay. Image image = 1; @@ -466,6 +487,8 @@ message Overlay { // Preprocessing configurations. message PreprocessingConfig { // Color preprocessing configuration. + // + // **Note:** This configuration is not supported. message Color { // Control color saturation of the video. Enter a value between -1 and 1, // where -1 is fully desaturated and 1 is maximum saturation. 0 is no @@ -484,6 +507,8 @@ message PreprocessingConfig { } // Denoise preprocessing configuration. + // + // **Note:** This configuration is not supported. message Denoise { // Set strength of the denoise. Enter a value between 0 and 1. The higher // the value, the smoother the image. 0 is no denoising. The default is 0. @@ -499,6 +524,8 @@ message PreprocessingConfig { } // Deblock preprocessing configuration. + // + // **Note:** This configuration is not supported. message Deblock { // Set strength of the deblocker. Enter a value between 0 and 1. The higher // the value, the stronger the block removal. 0 is no deblocking. The @@ -525,9 +552,13 @@ message PreprocessingConfig { double lufs = 1; // Enable boosting high frequency components. The default is `false`. + // + // **Note:** This field is not supported. bool high_boost = 2; // Enable boosting low frequency components. The default is `false`. + // + // **Note:** This field is not supported. bool low_boost = 3; } @@ -906,11 +937,12 @@ message VideoStream { // Supported rate control modes: // // - `vbr` - variable bitrate - // - `crf` - constant rate factor string rate_control_mode = 6; // Target CRF level. Must be between 10 and 36, where 10 is the highest // quality and 36 is the most efficient compression. The default is 21. + // + // **Note:** This field is not supported. int32 crf_level = 7; // GOP mode can be either by frame count or duration. diff --git a/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/services.proto b/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/services.proto index 992b3a1e..4d400c33 100644 --- a/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/services.proto +++ b/proto-google-cloud-video-transcoder-v1/src/main/proto/google/cloud/video/transcoder/v1/services.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/stub/transcoderservicestubsettings/createjob/SyncCreateJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/stub/transcoderservicestubsettings/createjob/SyncCreateJob.java new file mode 100644 index 00000000..05a6a7d4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/stub/transcoderservicestubsettings/createjob/SyncCreateJob.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.stub.samples; + +// [START transcoder_v1_generated_transcoderservicestubsettings_createjob_sync] +import com.google.cloud.video.transcoder.v1.stub.TranscoderServiceStubSettings; +import java.time.Duration; + +public class SyncCreateJob { + + public static void main(String[] args) throws Exception { + syncCreateJob(); + } + + public static void syncCreateJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + TranscoderServiceStubSettings.Builder transcoderServiceSettingsBuilder = + TranscoderServiceStubSettings.newBuilder(); + transcoderServiceSettingsBuilder + .createJobSettings() + .setRetrySettings( + transcoderServiceSettingsBuilder + .createJobSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TranscoderServiceStubSettings transcoderServiceSettings = + transcoderServiceSettingsBuilder.build(); + } +} +// [END transcoder_v1_generated_transcoderservicestubsettings_createjob_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..6c2ccec6 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; +import com.google.cloud.video.transcoder.v1.TranscoderServiceSettings; +import com.google.cloud.video.transcoder.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + TranscoderServiceSettings transcoderServiceSettings = + TranscoderServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TranscoderServiceClient transcoderServiceClient = + TranscoderServiceClient.create(transcoderServiceSettings); + } +} +// [END transcoder_v1_generated_transcoderserviceclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..fbc5c410 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_create_setendpoint_sync] +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; +import com.google.cloud.video.transcoder.v1.TranscoderServiceSettings; +import com.google.cloud.video.transcoder.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + TranscoderServiceSettings transcoderServiceSettings = + TranscoderServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + TranscoderServiceClient transcoderServiceClient = + TranscoderServiceClient.create(transcoderServiceSettings); + } +} +// [END transcoder_v1_generated_transcoderserviceclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/AsyncCreateJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/AsyncCreateJob.java new file mode 100644 index 00000000..f3cb6f76 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/AsyncCreateJob.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_createjob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.CreateJobRequest; +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class AsyncCreateJob { + + public static void main(String[] args) throws Exception { + asyncCreateJob(); + } + + public static void asyncCreateJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + CreateJobRequest request = + CreateJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setJob(Job.newBuilder().build()) + .build(); + ApiFuture future = transcoderServiceClient.createJobCallable().futureCall(request); + // Do something. + Job response = future.get(); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_createjob_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJob.java new file mode 100644 index 00000000..2e924224 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJob.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_createjob_sync] +import com.google.cloud.video.transcoder.v1.CreateJobRequest; +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncCreateJob { + + public static void main(String[] args) throws Exception { + syncCreateJob(); + } + + public static void syncCreateJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + CreateJobRequest request = + CreateJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setJob(Job.newBuilder().build()) + .build(); + Job response = transcoderServiceClient.createJob(request); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_createjob_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobLocationnameJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobLocationnameJob.java new file mode 100644 index 00000000..15f52610 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobLocationnameJob.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_createjob_locationnamejob_sync] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncCreateJobLocationnameJob { + + public static void main(String[] args) throws Exception { + syncCreateJobLocationnameJob(); + } + + public static void syncCreateJobLocationnameJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Job job = Job.newBuilder().build(); + Job response = transcoderServiceClient.createJob(parent, job); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_createjob_locationnamejob_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobStringJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobStringJob.java new file mode 100644 index 00000000..86b469cc --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjob/SyncCreateJobStringJob.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_createjob_stringjob_sync] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncCreateJobStringJob { + + public static void main(String[] args) throws Exception { + syncCreateJobStringJob(); + } + + public static void syncCreateJobStringJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Job job = Job.newBuilder().build(); + Job response = transcoderServiceClient.createJob(parent, job); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_createjob_stringjob_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/AsyncCreateJobTemplate.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/AsyncCreateJobTemplate.java new file mode 100644 index 00000000..72184384 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/AsyncCreateJobTemplate.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_createjobtemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.CreateJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class AsyncCreateJobTemplate { + + public static void main(String[] args) throws Exception { + asyncCreateJobTemplate(); + } + + public static void asyncCreateJobTemplate() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + CreateJobTemplateRequest request = + CreateJobTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setJobTemplate(JobTemplate.newBuilder().build()) + .setJobTemplateId("jobTemplateId-597733678") + .build(); + ApiFuture future = + transcoderServiceClient.createJobTemplateCallable().futureCall(request); + // Do something. + JobTemplate response = future.get(); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_createjobtemplate_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplate.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplate.java new file mode 100644 index 00000000..5965c80e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplate.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_createjobtemplate_sync] +import com.google.cloud.video.transcoder.v1.CreateJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncCreateJobTemplate { + + public static void main(String[] args) throws Exception { + syncCreateJobTemplate(); + } + + public static void syncCreateJobTemplate() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + CreateJobTemplateRequest request = + CreateJobTemplateRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setJobTemplate(JobTemplate.newBuilder().build()) + .setJobTemplateId("jobTemplateId-597733678") + .build(); + JobTemplate response = transcoderServiceClient.createJobTemplate(request); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_createjobtemplate_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateLocationnameJobtemplateString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateLocationnameJobtemplateString.java new file mode 100644 index 00000000..79565800 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateLocationnameJobtemplateString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START +// transcoder_v1_generated_transcoderserviceclient_createjobtemplate_locationnamejobtemplatestring_sync] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncCreateJobTemplateLocationnameJobtemplateString { + + public static void main(String[] args) throws Exception { + syncCreateJobTemplateLocationnameJobtemplateString(); + } + + public static void syncCreateJobTemplateLocationnameJobtemplateString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + JobTemplate jobTemplate = JobTemplate.newBuilder().build(); + String jobTemplateId = "jobTemplateId-597733678"; + JobTemplate response = + transcoderServiceClient.createJobTemplate(parent, jobTemplate, jobTemplateId); + } + } +} +// [END +// transcoder_v1_generated_transcoderserviceclient_createjobtemplate_locationnamejobtemplatestring_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateStringJobtemplateString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateStringJobtemplateString.java new file mode 100644 index 00000000..490ac42c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/createjobtemplate/SyncCreateJobTemplateStringJobtemplateString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START +// transcoder_v1_generated_transcoderserviceclient_createjobtemplate_stringjobtemplatestring_sync] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncCreateJobTemplateStringJobtemplateString { + + public static void main(String[] args) throws Exception { + syncCreateJobTemplateStringJobtemplateString(); + } + + public static void syncCreateJobTemplateStringJobtemplateString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + JobTemplate jobTemplate = JobTemplate.newBuilder().build(); + String jobTemplateId = "jobTemplateId-597733678"; + JobTemplate response = + transcoderServiceClient.createJobTemplate(parent, jobTemplate, jobTemplateId); + } + } +} +// [END +// transcoder_v1_generated_transcoderserviceclient_createjobtemplate_stringjobtemplatestring_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/AsyncDeleteJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/AsyncDeleteJob.java new file mode 100644 index 00000000..b8940dd9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/AsyncDeleteJob.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.DeleteJobRequest; +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteJob { + + public static void main(String[] args) throws Exception { + asyncDeleteJob(); + } + + public static void asyncDeleteJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + DeleteJobRequest request = + DeleteJobRequest.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setAllowMissing(true) + .build(); + ApiFuture future = transcoderServiceClient.deleteJobCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejob_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJob.java new file mode 100644 index 00000000..331c7ff1 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJob.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejob_sync] +import com.google.cloud.video.transcoder.v1.DeleteJobRequest; +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncDeleteJob { + + public static void main(String[] args) throws Exception { + syncDeleteJob(); + } + + public static void syncDeleteJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + DeleteJobRequest request = + DeleteJobRequest.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setAllowMissing(true) + .build(); + transcoderServiceClient.deleteJob(request); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejob_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobJobname.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobJobname.java new file mode 100644 index 00000000..d8e37534 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobJobname.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejob_jobname_sync] +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncDeleteJobJobname { + + public static void main(String[] args) throws Exception { + syncDeleteJobJobname(); + } + + public static void syncDeleteJobJobname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); + transcoderServiceClient.deleteJob(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejob_jobname_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobString.java new file mode 100644 index 00000000..fc12ee86 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejob/SyncDeleteJobString.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejob_string_sync] +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncDeleteJobString { + + public static void main(String[] args) throws Exception { + syncDeleteJobString(); + } + + public static void syncDeleteJobString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString(); + transcoderServiceClient.deleteJob(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejob_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/AsyncDeleteJobTemplate.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/AsyncDeleteJobTemplate.java new file mode 100644 index 00000000..4a6b7631 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/AsyncDeleteJobTemplate.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteJobTemplate { + + public static void main(String[] args) throws Exception { + asyncDeleteJobTemplate(); + } + + public static void asyncDeleteJobTemplate() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + DeleteJobTemplateRequest request = + DeleteJobTemplateRequest.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .setAllowMissing(true) + .build(); + ApiFuture future = + transcoderServiceClient.deleteJobTemplateCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplate.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplate.java new file mode 100644 index 00000000..e6fae509 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplate.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_sync] +import com.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncDeleteJobTemplate { + + public static void main(String[] args) throws Exception { + syncDeleteJobTemplate(); + } + + public static void syncDeleteJobTemplate() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + DeleteJobTemplateRequest request = + DeleteJobTemplateRequest.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .setAllowMissing(true) + .build(); + transcoderServiceClient.deleteJobTemplate(request); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateJobtemplatename.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateJobtemplatename.java new file mode 100644 index 00000000..05312174 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateJobtemplatename.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_jobtemplatename_sync] +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncDeleteJobTemplateJobtemplatename { + + public static void main(String[] args) throws Exception { + syncDeleteJobTemplateJobtemplatename(); + } + + public static void syncDeleteJobTemplateJobtemplatename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]"); + transcoderServiceClient.deleteJobTemplate(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_jobtemplatename_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateString.java new file mode 100644 index 00000000..24a95b4b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/deletejobtemplate/SyncDeleteJobTemplateString.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_string_sync] +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncDeleteJobTemplateString { + + public static void main(String[] args) throws Exception { + syncDeleteJobTemplateString(); + } + + public static void syncDeleteJobTemplateString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString(); + transcoderServiceClient.deleteJobTemplate(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_deletejobtemplate_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/AsyncGetJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/AsyncGetJob.java new file mode 100644 index 00000000..ffd35f9d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/AsyncGetJob.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.GetJobRequest; +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class AsyncGetJob { + + public static void main(String[] args) throws Exception { + asyncGetJob(); + } + + public static void asyncGetJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + GetJobRequest request = + GetJobRequest.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .build(); + ApiFuture future = transcoderServiceClient.getJobCallable().futureCall(request); + // Do something. + Job response = future.get(); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjob_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJob.java new file mode 100644 index 00000000..ff8b1837 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJob.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjob_sync] +import com.google.cloud.video.transcoder.v1.GetJobRequest; +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncGetJob { + + public static void main(String[] args) throws Exception { + syncGetJob(); + } + + public static void syncGetJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + GetJobRequest request = + GetJobRequest.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .build(); + Job response = transcoderServiceClient.getJob(request); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjob_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobJobname.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobJobname.java new file mode 100644 index 00000000..ccbaf336 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobJobname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjob_jobname_sync] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncGetJobJobname { + + public static void main(String[] args) throws Exception { + syncGetJobJobname(); + } + + public static void syncGetJobJobname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); + Job response = transcoderServiceClient.getJob(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjob_jobname_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobString.java new file mode 100644 index 00000000..1cebd9e8 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjob/SyncGetJobString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjob_string_sync] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.JobName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncGetJobString { + + public static void main(String[] args) throws Exception { + syncGetJobString(); + } + + public static void syncGetJobString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString(); + Job response = transcoderServiceClient.getJob(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjob_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/AsyncGetJobTemplate.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/AsyncGetJobTemplate.java new file mode 100644 index 00000000..4ef0af06 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/AsyncGetJobTemplate.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjobtemplate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.GetJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class AsyncGetJobTemplate { + + public static void main(String[] args) throws Exception { + asyncGetJobTemplate(); + } + + public static void asyncGetJobTemplate() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + GetJobTemplateRequest request = + GetJobTemplateRequest.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .build(); + ApiFuture future = + transcoderServiceClient.getJobTemplateCallable().futureCall(request); + // Do something. + JobTemplate response = future.get(); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjobtemplate_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplate.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplate.java new file mode 100644 index 00000000..ebeac0ed --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplate.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjobtemplate_sync] +import com.google.cloud.video.transcoder.v1.GetJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncGetJobTemplate { + + public static void main(String[] args) throws Exception { + syncGetJobTemplate(); + } + + public static void syncGetJobTemplate() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + GetJobTemplateRequest request = + GetJobTemplateRequest.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .build(); + JobTemplate response = transcoderServiceClient.getJobTemplate(request); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjobtemplate_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateJobtemplatename.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateJobtemplatename.java new file mode 100644 index 00000000..230561a3 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateJobtemplatename.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjobtemplate_jobtemplatename_sync] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncGetJobTemplateJobtemplatename { + + public static void main(String[] args) throws Exception { + syncGetJobTemplateJobtemplatename(); + } + + public static void syncGetJobTemplateJobtemplatename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]"); + JobTemplate response = transcoderServiceClient.getJobTemplate(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjobtemplate_jobtemplatename_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateString.java new file mode 100644 index 00000000..1ee41b86 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/getjobtemplate/SyncGetJobTemplateString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_getjobtemplate_string_sync] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.JobTemplateName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncGetJobTemplateString { + + public static void main(String[] args) throws Exception { + syncGetJobTemplateString(); + } + + public static void syncGetJobTemplateString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString(); + JobTemplate response = transcoderServiceClient.getJobTemplate(name); + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_getjobtemplate_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobs.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobs.java new file mode 100644 index 00000000..a345e24f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobs.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.ListJobsRequest; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class AsyncListJobs { + + public static void main(String[] args) throws Exception { + asyncListJobs(); + } + + public static void asyncListJobs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + ListJobsRequest request = + ListJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = transcoderServiceClient.listJobsPagedCallable().futureCall(request); + // Do something. + for (Job element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobs_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobsPaged.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobsPaged.java new file mode 100644 index 00000000..a72a7753 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/AsyncListJobsPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobs_paged_async] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.ListJobsRequest; +import com.google.cloud.video.transcoder.v1.ListJobsResponse; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; +import com.google.common.base.Strings; + +public class AsyncListJobsPaged { + + public static void main(String[] args) throws Exception { + asyncListJobsPaged(); + } + + public static void asyncListJobsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + ListJobsRequest request = + ListJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListJobsResponse response = transcoderServiceClient.listJobsCallable().call(request); + for (Job element : response.getJobsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobs_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobs.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobs.java new file mode 100644 index 00000000..34c9b0e4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobs.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobs_sync] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.ListJobsRequest; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncListJobs { + + public static void main(String[] args) throws Exception { + syncListJobs(); + } + + public static void syncListJobs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + ListJobsRequest request = + ListJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Job element : transcoderServiceClient.listJobs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobs_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsLocationname.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsLocationname.java new file mode 100644 index 00000000..0ef55d1a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobs_locationname_sync] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncListJobsLocationname { + + public static void main(String[] args) throws Exception { + syncListJobsLocationname(); + } + + public static void syncListJobsLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Job element : transcoderServiceClient.listJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobs_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsString.java new file mode 100644 index 00000000..1efdab49 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobs/SyncListJobsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobs_string_sync] +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncListJobsString { + + public static void main(String[] args) throws Exception { + syncListJobsString(); + } + + public static void syncListJobsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Job element : transcoderServiceClient.listJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobs_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplates.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplates.java new file mode 100644 index 00000000..c6123a02 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplates.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobtemplates_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.ListJobTemplatesRequest; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class AsyncListJobTemplates { + + public static void main(String[] args) throws Exception { + asyncListJobTemplates(); + } + + public static void asyncListJobTemplates() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + ListJobTemplatesRequest request = + ListJobTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + transcoderServiceClient.listJobTemplatesPagedCallable().futureCall(request); + // Do something. + for (JobTemplate element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobtemplates_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplatesPaged.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplatesPaged.java new file mode 100644 index 00000000..2dc81b3e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/AsyncListJobTemplatesPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobtemplates_paged_async] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.ListJobTemplatesRequest; +import com.google.cloud.video.transcoder.v1.ListJobTemplatesResponse; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; +import com.google.common.base.Strings; + +public class AsyncListJobTemplatesPaged { + + public static void main(String[] args) throws Exception { + asyncListJobTemplatesPaged(); + } + + public static void asyncListJobTemplatesPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + ListJobTemplatesRequest request = + ListJobTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListJobTemplatesResponse response = + transcoderServiceClient.listJobTemplatesCallable().call(request); + for (JobTemplate element : response.getJobTemplatesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobtemplates_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplates.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplates.java new file mode 100644 index 00000000..ea5f7ff9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplates.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobtemplates_sync] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.ListJobTemplatesRequest; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncListJobTemplates { + + public static void main(String[] args) throws Exception { + syncListJobTemplates(); + } + + public static void syncListJobTemplates() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + ListJobTemplatesRequest request = + ListJobTemplatesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (JobTemplate element : transcoderServiceClient.listJobTemplates(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobtemplates_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesLocationname.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesLocationname.java new file mode 100644 index 00000000..cb97c589 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesLocationname.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobtemplates_locationname_sync] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncListJobTemplatesLocationname { + + public static void main(String[] args) throws Exception { + syncListJobTemplatesLocationname(); + } + + public static void syncListJobTemplatesLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (JobTemplate element : transcoderServiceClient.listJobTemplates(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobtemplates_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesString.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesString.java new file mode 100644 index 00000000..7ddbd437 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/listjobtemplates/SyncListJobTemplatesString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_listjobtemplates_string_sync] +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.LocationName; +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; + +public class SyncListJobTemplatesString { + + public static void main(String[] args) throws Exception { + syncListJobTemplatesString(); + } + + public static void syncListJobTemplatesString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (JobTemplate element : transcoderServiceClient.listJobTemplates(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END transcoder_v1_generated_transcoderserviceclient_listjobtemplates_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderservicesettings/createjob/SyncCreateJob.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderservicesettings/createjob/SyncCreateJob.java new file mode 100644 index 00000000..4b6b332f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderservicesettings/createjob/SyncCreateJob.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderservicesettings_createjob_sync] +import com.google.cloud.video.transcoder.v1.TranscoderServiceSettings; +import java.time.Duration; + +public class SyncCreateJob { + + public static void main(String[] args) throws Exception { + syncCreateJob(); + } + + public static void syncCreateJob() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + TranscoderServiceSettings.Builder transcoderServiceSettingsBuilder = + TranscoderServiceSettings.newBuilder(); + transcoderServiceSettingsBuilder + .createJobSettings() + .setRetrySettings( + transcoderServiceSettingsBuilder + .createJobSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TranscoderServiceSettings transcoderServiceSettings = transcoderServiceSettingsBuilder.build(); + } +} +// [END transcoder_v1_generated_transcoderservicesettings_createjob_sync] From 95938dbcc5cf4e8a0b00935d2aba1c12ed02acfa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Jun 2022 17:34:16 +0200 Subject: [PATCH 07/13] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 (#353) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#​709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554)) - update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#​713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe)) - update dependency com.google.api:api-common to v2.2.1 ([#​710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414)) - update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#​701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36)) - update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#​711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#​708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#​712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51)) - update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#​703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990)) - update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#​705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579)) - update dependency io.grpc:grpc-bom to v1.47.0 ([#​707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666)) - update dependency org.checkerframework:checker-qual to v3.22.1 ([#​706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39)) - update dependency org.checkerframework:checker-qual to v3.22.2 ([#​717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0)) - update gax.version to v2.18.2 ([#​718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b)) - update google.common-protos.version to v2.9.0 ([#​714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c)) - update google.core.version to v2.8.0 ([#​719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d)) - update iam.version to v1.4.0 ([#​700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861)) - update iam.version to v1.4.1 ([#​716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-video-transcoder). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 16f84736..a7765fb8 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.12.0 + 2.13.0 pom import From 9cbd6c80888585496cc83542402072022687f6d5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 19:20:39 +0000 Subject: [PATCH 08/13] chore: update dependencies for regapic (#1467) (#355) * chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: https://github.com/googleapis/synthtool/commit/fa54eb2a78c6ee48613fd33152e2130e949dcbd9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a79f0627..f0625e4d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 -# created: 2022-05-19T15:12:45.278246753Z + digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 +# created: 2022-06-27T15:01:06.405564326Z diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45..f8f957af 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file From a211f55bc314ee412e9bc220635404cff879c578 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 20:44:12 +0000 Subject: [PATCH 09/13] feat: Enable REST transport for most of Java and Go clients (#354) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 456641589 Source-Link: https://github.com/googleapis/googleapis/commit/8a251f5225b789b2383207ffd978f6aa3d77fcf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9 --- google-cloud-video-transcoder/pom.xml | 16 + .../v1/TranscoderServiceClient.java | 15 + .../v1/TranscoderServiceSettings.java | 23 +- ...pJsonTranscoderServiceCallableFactory.java | 105 +++ .../stub/HttpJsonTranscoderServiceStub.java | 586 ++++++++++++ .../stub/TranscoderServiceStubSettings.java | 53 +- .../TranscoderServiceClientHttpJsonTest.java | 846 ++++++++++++++++++ .../SyncCreateSetCredentialsProvider1.java | 41 + 8 files changed, 1680 insertions(+), 5 deletions(-) create mode 100644 google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceCallableFactory.java create mode 100644 google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceStub.java create mode 100644 google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientHttpJsonTest.java create mode 100644 samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider1.java diff --git a/google-cloud-video-transcoder/pom.xml b/google-cloud-video-transcoder/pom.xml index f55b5e13..24c854d2 100644 --- a/google-cloud-video-transcoder/pom.xml +++ b/google-cloud-video-transcoder/pom.xml @@ -58,6 +58,10 @@ com.google.api gax-grpc
+ + com.google.api + gax-httpjson + org.threeten threetenbp @@ -77,12 +81,24 @@ test + + com.google.api + gax + testlib + test + com.google.api gax-grpc testlib test + + com.google.api + gax-httpjson + testlib + test + diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java index 7469520f..0ab6e5a2 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClient.java @@ -105,6 +105,21 @@ * TranscoderServiceClient.create(transcoderServiceSettings); * } * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * TranscoderServiceSettings transcoderServiceSettings =
+ *     TranscoderServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             TranscoderServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * TranscoderServiceClient transcoderServiceClient =
+ *     TranscoderServiceClient.create(transcoderServiceSettings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceSettings.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceSettings.java index 341c0958..c8946420 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceSettings.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/TranscoderServiceSettings.java @@ -24,6 +24,7 @@ import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -141,11 +142,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return TranscoderServiceStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return TranscoderServiceStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return TranscoderServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return TranscoderServiceStubSettings.defaultTransportChannelProvider(); } @@ -155,11 +163,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return TranscoderServiceStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -197,6 +211,11 @@ private static Builder createDefault() { return new Builder(TranscoderServiceStubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(TranscoderServiceStubSettings.newHttpJsonBuilder()); + } + public TranscoderServiceStubSettings.Builder getStubSettingsBuilder() { return ((TranscoderServiceStubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceCallableFactory.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceCallableFactory.java new file mode 100644 index 00000000..cda0219c --- /dev/null +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the TranscoderService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonTranscoderServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceStub.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceStub.java new file mode 100644 index 00000000..eaf61a0d --- /dev/null +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/HttpJsonTranscoderServiceStub.java @@ -0,0 +1,586 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.stub; + +import static com.google.cloud.video.transcoder.v1.TranscoderServiceClient.ListJobTemplatesPagedResponse; +import static com.google.cloud.video.transcoder.v1.TranscoderServiceClient.ListJobsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.video.transcoder.v1.CreateJobRequest; +import com.google.cloud.video.transcoder.v1.CreateJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.DeleteJobRequest; +import com.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.GetJobRequest; +import com.google.cloud.video.transcoder.v1.GetJobTemplateRequest; +import com.google.cloud.video.transcoder.v1.Job; +import com.google.cloud.video.transcoder.v1.JobTemplate; +import com.google.cloud.video.transcoder.v1.ListJobTemplatesRequest; +import com.google.cloud.video.transcoder.v1.ListJobTemplatesResponse; +import com.google.cloud.video.transcoder.v1.ListJobsRequest; +import com.google.cloud.video.transcoder.v1.ListJobsResponse; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the TranscoderService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonTranscoderServiceStub extends TranscoderServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor createJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.video.transcoder.v1.TranscoderService/CreateJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/jobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> ProtoRestSerializer.create().toBody("job", request.getJob())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Job.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listJobsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.video.transcoder.v1.TranscoderService/ListJobs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/jobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListJobsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.video.transcoder.v1.TranscoderService/GetJob") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/jobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Job.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.video.transcoder.v1.TranscoderService/DeleteJob") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/jobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "allowMissing", request.getAllowMissing()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createJobTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/jobTemplates", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "jobTemplateId", request.getJobTemplateId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("jobTemplate", request.getJobTemplate())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(JobTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listJobTemplatesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/jobTemplates", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListJobTemplatesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getJobTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/jobTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(JobTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteJobTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/jobTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createJobCallable; + private final UnaryCallable listJobsCallable; + private final UnaryCallable listJobsPagedCallable; + private final UnaryCallable getJobCallable; + private final UnaryCallable deleteJobCallable; + private final UnaryCallable createJobTemplateCallable; + private final UnaryCallable + listJobTemplatesCallable; + private final UnaryCallable + listJobTemplatesPagedCallable; + private final UnaryCallable getJobTemplateCallable; + private final UnaryCallable deleteJobTemplateCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonTranscoderServiceStub create(TranscoderServiceStubSettings settings) + throws IOException { + return new HttpJsonTranscoderServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonTranscoderServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonTranscoderServiceStub( + TranscoderServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonTranscoderServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonTranscoderServiceStub( + TranscoderServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonTranscoderServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonTranscoderServiceStub( + TranscoderServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonTranscoderServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonTranscoderServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonTranscoderServiceStub( + TranscoderServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listJobsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listJobsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createJobTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createJobTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listJobTemplatesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listJobTemplatesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getJobTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getJobTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteJobTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteJobTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createJobCallable = + callableFactory.createUnaryCallable( + createJobTransportSettings, settings.createJobSettings(), clientContext); + this.listJobsCallable = + callableFactory.createUnaryCallable( + listJobsTransportSettings, settings.listJobsSettings(), clientContext); + this.listJobsPagedCallable = + callableFactory.createPagedCallable( + listJobsTransportSettings, settings.listJobsSettings(), clientContext); + this.getJobCallable = + callableFactory.createUnaryCallable( + getJobTransportSettings, settings.getJobSettings(), clientContext); + this.deleteJobCallable = + callableFactory.createUnaryCallable( + deleteJobTransportSettings, settings.deleteJobSettings(), clientContext); + this.createJobTemplateCallable = + callableFactory.createUnaryCallable( + createJobTemplateTransportSettings, + settings.createJobTemplateSettings(), + clientContext); + this.listJobTemplatesCallable = + callableFactory.createUnaryCallable( + listJobTemplatesTransportSettings, settings.listJobTemplatesSettings(), clientContext); + this.listJobTemplatesPagedCallable = + callableFactory.createPagedCallable( + listJobTemplatesTransportSettings, settings.listJobTemplatesSettings(), clientContext); + this.getJobTemplateCallable = + callableFactory.createUnaryCallable( + getJobTemplateTransportSettings, settings.getJobTemplateSettings(), clientContext); + this.deleteJobTemplateCallable = + callableFactory.createUnaryCallable( + deleteJobTemplateTransportSettings, + settings.deleteJobTemplateSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createJobMethodDescriptor); + methodDescriptors.add(listJobsMethodDescriptor); + methodDescriptors.add(getJobMethodDescriptor); + methodDescriptors.add(deleteJobMethodDescriptor); + methodDescriptors.add(createJobTemplateMethodDescriptor); + methodDescriptors.add(listJobTemplatesMethodDescriptor); + methodDescriptors.add(getJobTemplateMethodDescriptor); + methodDescriptors.add(deleteJobTemplateMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createJobCallable() { + return createJobCallable; + } + + @Override + public UnaryCallable listJobsCallable() { + return listJobsCallable; + } + + @Override + public UnaryCallable listJobsPagedCallable() { + return listJobsPagedCallable; + } + + @Override + public UnaryCallable getJobCallable() { + return getJobCallable; + } + + @Override + public UnaryCallable deleteJobCallable() { + return deleteJobCallable; + } + + @Override + public UnaryCallable createJobTemplateCallable() { + return createJobTemplateCallable; + } + + @Override + public UnaryCallable + listJobTemplatesCallable() { + return listJobTemplatesCallable; + } + + @Override + public UnaryCallable + listJobTemplatesPagedCallable() { + return listJobTemplatesPagedCallable; + } + + @Override + public UnaryCallable getJobTemplateCallable() { + return getJobTemplateCallable; + } + + @Override + public UnaryCallable deleteJobTemplateCallable() { + return deleteJobTemplateCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java index e9161dd8..332d6a15 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1/stub/TranscoderServiceStubSettings.java @@ -28,6 +28,9 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; @@ -276,6 +279,11 @@ public TranscoderServiceStub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcTranscoderServiceStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonTranscoderServiceStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -308,18 +316,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(TranscoderServiceStubSettings.class)) @@ -327,11 +342,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(TranscoderServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TranscoderServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -466,6 +500,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .createJobSettings() diff --git a/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientHttpJsonTest.java b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientHttpJsonTest.java new file mode 100644 index 00000000..f469df44 --- /dev/null +++ b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1/TranscoderServiceClientHttpJsonTest.java @@ -0,0 +1,846 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1; + +import static com.google.cloud.video.transcoder.v1.TranscoderServiceClient.ListJobTemplatesPagedResponse; +import static com.google.cloud.video.transcoder.v1.TranscoderServiceClient.ListJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.video.transcoder.v1.stub.HttpJsonTranscoderServiceStub; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TranscoderServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static TranscoderServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonTranscoderServiceStub.getMethodDescriptors(), + TranscoderServiceSettings.getDefaultEndpoint()); + TranscoderServiceSettings settings = + TranscoderServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + TranscoderServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TranscoderServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createJobTest() throws Exception { + Job expectedResponse = + Job.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setInputUri("inputUri470706498") + .setOutputUri("outputUri-2119300949") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Job job = Job.newBuilder().build(); + + Job actualResponse = client.createJob(parent, job); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Job job = Job.newBuilder().build(); + client.createJob(parent, job); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTest2() throws Exception { + Job expectedResponse = + Job.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setInputUri("inputUri470706498") + .setOutputUri("outputUri-2119300949") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Job job = Job.newBuilder().build(); + + Job actualResponse = client.createJob(parent, job); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Job job = Job.newBuilder().build(); + client.createJob(parent, job); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobsTest() throws Exception { + Job responsesElement = Job.newBuilder().build(); + ListJobsResponse expectedResponse = + ListJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListJobsPagedResponse pagedListResponse = client.listJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobsTest2() throws Exception { + Job responsesElement = Job.newBuilder().build(); + ListJobsResponse expectedResponse = + ListJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListJobsPagedResponse pagedListResponse = client.listJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTest() throws Exception { + Job expectedResponse = + Job.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setInputUri("inputUri470706498") + .setOutputUri("outputUri-2119300949") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); + + Job actualResponse = client.getJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); + client.getJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTest2() throws Exception { + Job expectedResponse = + Job.newBuilder() + .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString()) + .setInputUri("inputUri470706498") + .setOutputUri("outputUri-2119300949") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setTtlAfterCompletionDays(107576420) + .putAllLabels(new HashMap()) + .setError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3306/locations/location-3306/jobs/job-3306"; + + Job actualResponse = client.getJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3306/locations/location-3306/jobs/job-3306"; + client.getJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); + + client.deleteJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]"); + client.deleteJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3306/locations/location-3306/jobs/job-3306"; + + client.deleteJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3306/locations/location-3306/jobs/job-3306"; + client.deleteJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTemplateTest() throws Exception { + JobTemplate expectedResponse = + JobTemplate.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + JobTemplate jobTemplate = JobTemplate.newBuilder().build(); + String jobTemplateId = "jobTemplateId-597733678"; + + JobTemplate actualResponse = client.createJobTemplate(parent, jobTemplate, jobTemplateId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createJobTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + JobTemplate jobTemplate = JobTemplate.newBuilder().build(); + String jobTemplateId = "jobTemplateId-597733678"; + client.createJobTemplate(parent, jobTemplate, jobTemplateId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTemplateTest2() throws Exception { + JobTemplate expectedResponse = + JobTemplate.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + JobTemplate jobTemplate = JobTemplate.newBuilder().build(); + String jobTemplateId = "jobTemplateId-597733678"; + + JobTemplate actualResponse = client.createJobTemplate(parent, jobTemplate, jobTemplateId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createJobTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + JobTemplate jobTemplate = JobTemplate.newBuilder().build(); + String jobTemplateId = "jobTemplateId-597733678"; + client.createJobTemplate(parent, jobTemplate, jobTemplateId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTemplatesTest() throws Exception { + JobTemplate responsesElement = JobTemplate.newBuilder().build(); + ListJobTemplatesResponse expectedResponse = + ListJobTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllJobTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListJobTemplatesPagedResponse pagedListResponse = client.listJobTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobTemplatesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listJobTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTemplatesTest2() throws Exception { + JobTemplate responsesElement = JobTemplate.newBuilder().build(); + ListJobTemplatesResponse expectedResponse = + ListJobTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllJobTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListJobTemplatesPagedResponse pagedListResponse = client.listJobTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobTemplatesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listJobTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTemplateTest() throws Exception { + JobTemplate expectedResponse = + JobTemplate.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]"); + + JobTemplate actualResponse = client.getJobTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]"); + client.getJobTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTemplateTest2() throws Exception { + JobTemplate expectedResponse = + JobTemplate.newBuilder() + .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString()) + .setConfig(JobConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3644/locations/location-3644/jobTemplates/jobTemplate-3644"; + + JobTemplate actualResponse = client.getJobTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3644/locations/location-3644/jobTemplates/jobTemplate-3644"; + client.getJobTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTemplateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]"); + + client.deleteJobTemplate(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteJobTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]"); + client.deleteJobTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTemplateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3644/locations/location-3644/jobTemplates/jobTemplate-3644"; + + client.deleteJobTemplate(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteJobTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3644/locations/location-3644/jobTemplates/jobTemplate-3644"; + client.deleteJobTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..033d1fd6 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/video/transcoder/v1/transcoderserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.video.transcoder.v1.samples; + +// [START transcoder_v1_generated_transcoderserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.video.transcoder.v1.TranscoderServiceClient; +import com.google.cloud.video.transcoder.v1.TranscoderServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + TranscoderServiceSettings transcoderServiceSettings = + TranscoderServiceSettings.newBuilder() + .setTransportChannelProvider( + TranscoderServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + TranscoderServiceClient transcoderServiceClient = + TranscoderServiceClient.create(transcoderServiceSettings); + } +} +// [END transcoder_v1_generated_transcoderserviceclient_create_setcredentialsprovider1_sync] From 95372f119b7ee8d720966f32b9bf90f0a186594b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 02:16:11 +0000 Subject: [PATCH 10/13] chore: Disable CLIRR checks on releas (#1474) (#358) Source-Link: https://github.com/googleapis/synthtool/commit/7a220e27993a25ab3cda26510d5619d97b6952a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/stage.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f0625e4d..a454a61e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 -# created: 2022-06-27T15:01:06.405564326Z + digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 +# created: 2022-06-29T23:17:33.110417661Z diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 77dc4e8f..1dba8de1 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -32,6 +32,7 @@ retry_with_backoff 3 10 \ mvn clean deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ -DskipTests=true \ + -Dclirr.skip=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ @@ -42,4 +43,4 @@ then mvn nexus-staging:release -B \ -DperformRelease=true \ --settings=settings.xml -fi \ No newline at end of file +fi From 692c1029a4cafb6be79661197923244d2e71e2d6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 03:54:22 +0000 Subject: [PATCH 11/13] chore(main): release 1.1.1-SNAPSHOT (#347) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-video-transcoder-bom/pom.xml | 8 ++++---- google-cloud-video-transcoder/pom.xml | 4 ++-- grpc-google-cloud-video-transcoder-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-video-transcoder-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/google-cloud-video-transcoder-bom/pom.xml b/google-cloud-video-transcoder-bom/pom.xml index cdfa190b..59be7e16 100644 --- a/google-cloud-video-transcoder-bom/pom.xml +++ b/google-cloud-video-transcoder-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-video-transcoder-bom - 1.1.0 + 1.1.1-SNAPSHOT pom com.google.cloud @@ -57,17 +57,17 @@ com.google.cloud google-cloud-video-transcoder - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/google-cloud-video-transcoder/pom.xml b/google-cloud-video-transcoder/pom.xml index 24c854d2..42a7ebd2 100644 --- a/google-cloud-video-transcoder/pom.xml +++ b/google-cloud-video-transcoder/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-video-transcoder - 1.1.0 + 1.1.1-SNAPSHOT jar Google Video Transcoder https://github.com/googleapis/java-video-transcoder @@ -11,7 +11,7 @@ com.google.cloud google-cloud-video-transcoder-parent - 1.1.0 + 1.1.1-SNAPSHOT google-cloud-video-transcoder diff --git a/grpc-google-cloud-video-transcoder-v1/pom.xml b/grpc-google-cloud-video-transcoder-v1/pom.xml index f31394b4..2fc4eabd 100644 --- a/grpc-google-cloud-video-transcoder-v1/pom.xml +++ b/grpc-google-cloud-video-transcoder-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.1.0 + 1.1.1-SNAPSHOT grpc-google-cloud-video-transcoder-v1 GRPC library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index a7765fb8..a0f372ea 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-video-transcoder-parent pom - 1.1.0 + 1.1.1-SNAPSHOT Google Video Transcoder Parent https://github.com/googleapis/java- @@ -61,17 +61,17 @@ com.google.cloud google-cloud-video-transcoder - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/proto-google-cloud-video-transcoder-v1/pom.xml b/proto-google-cloud-video-transcoder-v1/pom.xml index 97dd2b1f..d05505f5 100644 --- a/proto-google-cloud-video-transcoder-v1/pom.xml +++ b/proto-google-cloud-video-transcoder-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.1.0 + 1.1.1-SNAPSHOT proto-google-cloud-video-transcoder-v1 Proto library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ea0e1b86..1333ca21 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-video-transcoder - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 92deacd7..768dad71 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-video-transcoder:1.1.0:1.1.0 -grpc-google-cloud-video-transcoder-v1:1.1.0:1.1.0 -proto-google-cloud-video-transcoder-v1:1.1.0:1.1.0 +google-cloud-video-transcoder:1.1.0:1.1.1-SNAPSHOT +grpc-google-cloud-video-transcoder-v1:1.1.0:1.1.1-SNAPSHOT +proto-google-cloud-video-transcoder-v1:1.1.0:1.1.1-SNAPSHOT From 39e79b0ec7674a0f1e4bc6235bb2e14d52124103 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 1 Jul 2022 10:30:19 -0400 Subject: [PATCH 12/13] ci: removing clirr from required checks (#356) Making CLIRR not required. The version bumps are now controlled by the Release Please and OwlBot. The CL authors create appropriate change description to control major version bumps. --- .github/sync-repo-settings.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 6f09d695..dd5626f3 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -11,7 +11,6 @@ branchProtectionRules: - dependencies (8) - dependencies (11) - lint - - clirr - units (8) - units (11) - 'Kokoro - Test: Integration' @@ -26,7 +25,6 @@ branchProtectionRules: - dependencies (8) - dependencies (11) - lint - - clirr - units (7) - units (8) - units (11) From 55b90c38cec4c50c7a0164863c5e9e4978098d20 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 16:22:16 +0000 Subject: [PATCH 13/13] chore(main): release 1.2.0 (#359) :robot: I have created a release *beep* *boop* --- ## [1.2.0](https://github.com/googleapis/java-video-transcoder/compare/v1.1.0...v1.2.0) (2022-07-01) ### Features * add support for user labels for job and job template ([#352](https://github.com/googleapis/java-video-transcoder/issues/352)) ([018d013](https://github.com/googleapis/java-video-transcoder/commit/018d0133234c871a77736ce840cfd5052a72ecdc)) * Enable REST transport for most of Java and Go clients ([#354](https://github.com/googleapis/java-video-transcoder/issues/354)) ([a211f55](https://github.com/googleapis/java-video-transcoder/commit/a211f55bc314ee412e9bc220635404cff879c578)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#353](https://github.com/googleapis/java-video-transcoder/issues/353)) ([95938db](https://github.com/googleapis/java-video-transcoder/commit/95938dbcc5cf4e8a0b00935d2aba1c12ed02acfa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 13 +++++++++++++ google-cloud-video-transcoder-bom/pom.xml | 8 ++++---- google-cloud-video-transcoder/pom.xml | 4 ++-- grpc-google-cloud-video-transcoder-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-video-transcoder-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 8 files changed, 31 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c968e58c..d7eb94f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.2.0](https://github.com/googleapis/java-video-transcoder/compare/v1.1.0...v1.2.0) (2022-07-01) + + +### Features + +* add support for user labels for job and job template ([#352](https://github.com/googleapis/java-video-transcoder/issues/352)) ([018d013](https://github.com/googleapis/java-video-transcoder/commit/018d0133234c871a77736ce840cfd5052a72ecdc)) +* Enable REST transport for most of Java and Go clients ([#354](https://github.com/googleapis/java-video-transcoder/issues/354)) ([a211f55](https://github.com/googleapis/java-video-transcoder/commit/a211f55bc314ee412e9bc220635404cff879c578)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#353](https://github.com/googleapis/java-video-transcoder/issues/353)) ([95938db](https://github.com/googleapis/java-video-transcoder/commit/95938dbcc5cf4e8a0b00935d2aba1c12ed02acfa)) + ## [1.1.0](https://github.com/googleapis/java-video-transcoder/compare/v1.0.4...v1.1.0) (2022-05-19) diff --git a/google-cloud-video-transcoder-bom/pom.xml b/google-cloud-video-transcoder-bom/pom.xml index 59be7e16..ddb3cfae 100644 --- a/google-cloud-video-transcoder-bom/pom.xml +++ b/google-cloud-video-transcoder-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-video-transcoder-bom - 1.1.1-SNAPSHOT + 1.2.0 pom com.google.cloud @@ -57,17 +57,17 @@ com.google.cloud google-cloud-video-transcoder - 1.1.1-SNAPSHOT + 1.2.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.1.1-SNAPSHOT + 1.2.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.1.1-SNAPSHOT + 1.2.0 diff --git a/google-cloud-video-transcoder/pom.xml b/google-cloud-video-transcoder/pom.xml index 42a7ebd2..9bec7d76 100644 --- a/google-cloud-video-transcoder/pom.xml +++ b/google-cloud-video-transcoder/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-video-transcoder - 1.1.1-SNAPSHOT + 1.2.0 jar Google Video Transcoder https://github.com/googleapis/java-video-transcoder @@ -11,7 +11,7 @@ com.google.cloud google-cloud-video-transcoder-parent - 1.1.1-SNAPSHOT + 1.2.0 google-cloud-video-transcoder diff --git a/grpc-google-cloud-video-transcoder-v1/pom.xml b/grpc-google-cloud-video-transcoder-v1/pom.xml index 2fc4eabd..01f5cd2e 100644 --- a/grpc-google-cloud-video-transcoder-v1/pom.xml +++ b/grpc-google-cloud-video-transcoder-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.1.1-SNAPSHOT + 1.2.0 grpc-google-cloud-video-transcoder-v1 GRPC library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 1.1.1-SNAPSHOT + 1.2.0 diff --git a/pom.xml b/pom.xml index a0f372ea..c1c94855 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-video-transcoder-parent pom - 1.1.1-SNAPSHOT + 1.2.0 Google Video Transcoder Parent https://github.com/googleapis/java- @@ -61,17 +61,17 @@ com.google.cloud google-cloud-video-transcoder - 1.1.1-SNAPSHOT + 1.2.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.1.1-SNAPSHOT + 1.2.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.1.1-SNAPSHOT + 1.2.0 diff --git a/proto-google-cloud-video-transcoder-v1/pom.xml b/proto-google-cloud-video-transcoder-v1/pom.xml index d05505f5..6a32f874 100644 --- a/proto-google-cloud-video-transcoder-v1/pom.xml +++ b/proto-google-cloud-video-transcoder-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.1.1-SNAPSHOT + 1.2.0 proto-google-cloud-video-transcoder-v1 Proto library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 1.1.1-SNAPSHOT + 1.2.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 1333ca21..7b98a717 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-video-transcoder - 1.1.1-SNAPSHOT + 1.2.0 diff --git a/versions.txt b/versions.txt index 768dad71..4858680b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-video-transcoder:1.1.0:1.1.1-SNAPSHOT -grpc-google-cloud-video-transcoder-v1:1.1.0:1.1.1-SNAPSHOT -proto-google-cloud-video-transcoder-v1:1.1.0:1.1.1-SNAPSHOT +google-cloud-video-transcoder:1.2.0:1.2.0 +grpc-google-cloud-video-transcoder-v1:1.2.0:1.2.0 +proto-google-cloud-video-transcoder-v1:1.2.0:1.2.0