diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index 20f3acc2..47c2ba13 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -5,3 +5,7 @@ externalManifests: - type: json file: '.github/readme/synth.metadata/synth.metadata' jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 0d6b1f63..04e2f85e 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-video-transcoder.git", - "sha": "c665b2d5e05c4ed33ed205cf55dfe50d3f040a93" + "sha": "65d7c6fa2ce0917bc77f2e8e94fd53c2c0a432b4" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "996775eca5fd934edac3c2ae34b80ff0395b1717" + "sha": "16ec872dd898d7de6e1822badfac32484b5d9031" } } ] diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 2b6cdbc9..7c8816a7 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,7 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-v') + if: contains(github.head_ref, 'release-please') steps: - uses: actions/github-script@v3 with: @@ -16,8 +16,8 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(master): release " + if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { return; } diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 68302207..def8b3a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,7 +54,11 @@ jobs: with: java-version: 8 - run: java -version - - run: .kokoro/linkage-monitor.sh + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml deleted file mode 100644 index 6844407b..00000000 --- a/.github/workflows/formatting.yaml +++ /dev/null @@ -1,25 +0,0 @@ -on: - pull_request_target: - types: [opened, synchronize] - branches: - - master -name: format -jobs: - format-code: - runs-on: ubuntu-latest - env: - ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} - steps: - - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - uses: actions/setup-java@v1 - with: - java-version: 11 - - run: "mvn com.coveo:fmt-maven-plugin:format" - - uses: googleapis/code-suggester@v1 - with: - command: review - pull_number: ${{ github.event.pull_request.number }} - git_dir: '.' diff --git a/.kokoro/build.sh b/.kokoro/build.sh index c20c1ee5..171320e3 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -29,7 +29,7 @@ echo ${JOB_TYPE} # attempt to install 3 times with exponential backoff (starting with 10 seconds) retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true \ -Denforcer.skip=true \ @@ -60,6 +60,7 @@ javadoc) ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ -Penable-integration-tests \ -DtrimStackTrace=false \ -Dclirr.skip=true \ @@ -81,6 +82,7 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ + -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ @@ -110,8 +112,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-video-transcoder + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-video-transcoder fi echo "exiting with ${RETURN_CODE}" diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index c91e5a56..0fb8c843 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -31,7 +31,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true @@ -86,4 +86,4 @@ then else msg "Errors found. See log statements above." exit 1 -fi \ No newline at end of file +fi diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh deleted file mode 100755 index 759ab4e2..00000000 --- a/.kokoro/linkage-monitor.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2019 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 -# -# http://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. - -set -eo pipefail -# Display commands being run. -set -x - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java version -java -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true - -# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR -JAR=linkage-monitor-latest-all-deps.jar -curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" - -# Fails if there's new linkage errors compared with baseline -java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 0ff08fd6..31f9b9a3 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,10 +7,10 @@ env_vars: { value: "docs-staging" } +# cloud-rad staging env_vars: { key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" - # Production will be at: docs-staging-v2 + value: "docs-staging-v2-staging" } env_vars: { @@ -26,4 +26,4 @@ before_action { keyname: "docuploader_service_account" } } -} +} \ No newline at end of file diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 1c4c777f..7777ead0 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -71,7 +71,7 @@ python3 -m docuploader create-metadata \ --version ${VERSION} \ --language java -# upload docs +# upload docs to staging bucket python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 00000000..eeb15e29 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-video-transcoder/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 00000000..e80860d4 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# 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 +# +# http://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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-video-transcoder +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx- diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c455195..0e5bf8a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +### [0.1.8](https://www.github.com/googleapis/java-video-transcoder/compare/v0.1.7...v0.1.8) (2021-02-22) + + +### Documentation + +* generate sample code in the Java microgenerator ([#108](https://www.github.com/googleapis/java-video-transcoder/issues/108)) ([5fe6226](https://www.github.com/googleapis/java-video-transcoder/commit/5fe6226fdbc87aab888a049fd2d5040dbedbd0d2)) +* put FPS table in code block ([#88](https://www.github.com/googleapis/java-video-transcoder/issues/88)) ([65d7c6f](https://www.github.com/googleapis/java-video-transcoder/commit/65d7c6fa2ce0917bc77f2e8e94fd53c2c0a432b4)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.18.0 ([#92](https://www.github.com/googleapis/java-video-transcoder/issues/92)) ([0ce5f5b](https://www.github.com/googleapis/java-video-transcoder/commit/0ce5f5ba364654ebd4391b73577163c277cdc538)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#116](https://www.github.com/googleapis/java-video-transcoder/issues/116)) ([d643ba3](https://www.github.com/googleapis/java-video-transcoder/commit/d643ba3ccbb17c30042540434554dae5ff74a12c)) + ### [0.1.7](https://www.github.com/googleapis/java-video-transcoder/compare/v0.1.6...v0.1.7) (2020-12-15) diff --git a/LICENSE b/LICENSE index d6456956..261eeb9e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/README.md b/README.md index 38d5e4d2..80e020ce 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,11 @@ If you are using Maven, add this to your pom.xml file: ``` -If you are using Gradle, add this to your dependencies +If you are using Gradle without BOM, add this to your dependencies ```Groovy compile 'com.google.cloud:google-cloud-video-transcoder:0.1.4' ``` + If you are using SBT, add this to your dependencies ```Scala libraryDependencies += "com.google.cloud" % "google-cloud-video-transcoder" % "0.1.4" diff --git a/google-cloud-video-transcoder-bom/pom.xml b/google-cloud-video-transcoder-bom/pom.xml index cba55fb3..889f39f9 100644 --- a/google-cloud-video-transcoder-bom/pom.xml +++ b/google-cloud-video-transcoder-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-video-transcoder-bom - 0.1.7 + 0.1.8 pom com.google.cloud google-cloud-shared-config - 0.9.4 + 0.10.0 Google Video Transcoder BOM @@ -68,17 +68,17 @@ com.google.cloud google-cloud-video-transcoder - 0.1.7 + 0.1.8 com.google.api.grpc proto-google-cloud-video-transcoder-v1beta1 - 0.1.7 + 0.1.8 com.google.api.grpc grpc-google-cloud-video-transcoder-v1beta1 - 0.1.7 + 0.1.8 diff --git a/google-cloud-video-transcoder/pom.xml b/google-cloud-video-transcoder/pom.xml index 6beaedfb..9a3d8ed1 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 - 0.1.7 + 0.1.8 jar Google Video Transcoder https://github.com/googleapis/java-video-transcoder @@ -11,7 +11,7 @@ com.google.cloud google-cloud-video-transcoder-parent - 0.1.7 + 0.1.8 google-cloud-video-transcoder @@ -68,7 +68,7 @@ junit junit test - 4.13.1 + 4.13.2 diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClient.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClient.java index 16c5b294..364f4f4e 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClient.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClient.java @@ -46,6 +46,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Job job = Job.newBuilder().build();
+ *   Job response = transcoderServiceClient.createJob(parent, job);
+ * }
+ * }
+ * *

Note: close() needs to be called on the TranscoderServiceClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -96,7 +104,7 @@ *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi -@Generated("by gapic-generator") +@Generated("by gapic-generator-java") public class TranscoderServiceClient implements BackgroundResource { private final TranscoderServiceSettings settings; private final TranscoderServiceStub stub; @@ -153,6 +161,16 @@ public TranscoderServiceStub getStub() { /** * Creates a job in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Job job = Job.newBuilder().build();
+   *   Job response = transcoderServiceClient.createJob(parent, job);
+   * }
+   * }
+ * * @param parent Required. The parent location to create and process this job. Format: * `projects/{project}/locations/{location}` * @param job Required. Parameters for creating transcoding job. @@ -171,6 +189,16 @@ public final Job createJob(LocationName parent, Job job) { /** * Creates a job in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Job job = Job.newBuilder().build();
+   *   Job response = transcoderServiceClient.createJob(parent, job);
+   * }
+   * }
+ * * @param parent Required. The parent location to create and process this job. Format: * `projects/{project}/locations/{location}` * @param job Required. Parameters for creating transcoding job. @@ -185,6 +213,19 @@ public final Job createJob(String parent, Job job) { /** * Creates a job in the specified region. * + *

Sample code: + * + *

{@code
+   * 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);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -197,6 +238,19 @@ public final Job createJob(CreateJobRequest request) { * Creates a job in the specified region. * *

Sample code: + * + *

{@code
+   * 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();
+   * }
+   * }
*/ public final UnaryCallable createJobCallable() { return stub.createJobCallable(); @@ -206,6 +260,17 @@ public final UnaryCallable createJobCallable() { /** * Lists jobs in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Job element : transcoderServiceClient.listJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -219,6 +284,17 @@ public final ListJobsPagedResponse listJobs(LocationName parent) { /** * Lists jobs in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Job element : transcoderServiceClient.listJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -231,6 +307,22 @@ public final ListJobsPagedResponse listJobs(String parent) { /** * Lists jobs in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   ListJobsRequest request =
+   *       ListJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Job element : transcoderServiceClient.listJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -243,6 +335,22 @@ public final ListJobsPagedResponse listJobs(ListJobsRequest request) { * Lists jobs in the specified region. * *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   ListJobsRequest request =
+   *       ListJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = transcoderServiceClient.listJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Job element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listJobsPagedCallable() { return stub.listJobsPagedCallable(); @@ -253,6 +361,23 @@ public final UnaryCallable listJobsPaged * Lists jobs in the specified region. * *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   while (true) {
+   *     ListJobsResponse response = transcoderServiceClient.listJobsCallable().call(request);
+   *     for (Job element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listJobsCallable() { return stub.listJobsCallable(); @@ -262,6 +387,15 @@ public final UnaryCallable listJobsCallable() /** * Returns the job data. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
+   *   Job response = transcoderServiceClient.getJob(name);
+   * }
+   * }
+ * * @param name Required. The name of the job to retrieve. Format: * `projects/{project}/locations/{location}/jobs/{job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -276,6 +410,15 @@ public final Job getJob(JobName name) { /** * Returns the job data. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString();
+   *   Job response = transcoderServiceClient.getJob(name);
+   * }
+   * }
+ * * @param name Required. The name of the job to retrieve. Format: * `projects/{project}/locations/{location}/jobs/{job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -289,6 +432,18 @@ public final Job getJob(String name) { /** * Returns the job data. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   GetJobRequest request =
+   *       GetJobRequest.newBuilder()
+   *           .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+   *           .build();
+   *   Job response = transcoderServiceClient.getJob(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -301,6 +456,18 @@ public final Job getJob(GetJobRequest request) { * Returns the job data. * *

Sample code: + * + *

{@code
+   * 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();
+   * }
+   * }
*/ public final UnaryCallable getJobCallable() { return stub.getJobCallable(); @@ -310,6 +477,15 @@ public final UnaryCallable getJobCallable() { /** * Deletes a job. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]");
+   *   transcoderServiceClient.deleteJob(name);
+   * }
+   * }
+ * * @param name Required. The name of the job to delete. Format: * `projects/{project}/locations/{location}/jobs/{job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -324,6 +500,15 @@ public final void deleteJob(JobName name) { /** * Deletes a job. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   String name = JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString();
+   *   transcoderServiceClient.deleteJob(name);
+   * }
+   * }
+ * * @param name Required. The name of the job to delete. Format: * `projects/{project}/locations/{location}/jobs/{job}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -337,6 +522,18 @@ public final void deleteJob(String name) { /** * Deletes a job. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   DeleteJobRequest request =
+   *       DeleteJobRequest.newBuilder()
+   *           .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+   *           .build();
+   *   transcoderServiceClient.deleteJob(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -349,6 +546,18 @@ public final void deleteJob(DeleteJobRequest request) { * Deletes a job. * *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   DeleteJobRequest request =
+   *       DeleteJobRequest.newBuilder()
+   *           .setName(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
+   *           .build();
+   *   ApiFuture future = transcoderServiceClient.deleteJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteJobCallable() { return stub.deleteJobCallable(); @@ -358,6 +567,18 @@ public final UnaryCallable deleteJobCallable() { /** * Creates a job template in the specified region. * + *

Sample code: + * + *

{@code
+   * 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);
+   * }
+   * }
+ * * @param parent Required. The parent location to create this job template. Format: * `projects/{project}/locations/{location}` * @param jobTemplate Required. Parameters for creating job template. @@ -382,6 +603,18 @@ public final JobTemplate createJobTemplate( /** * Creates a job template in the specified region. * + *

Sample code: + * + *

{@code
+   * 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);
+   * }
+   * }
+ * * @param parent Required. The parent location to create this job template. Format: * `projects/{project}/locations/{location}` * @param jobTemplate Required. Parameters for creating job template. @@ -406,6 +639,20 @@ public final JobTemplate createJobTemplate( /** * Creates a job template in the specified region. * + *

Sample code: + * + *

{@code
+   * 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);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -418,6 +665,21 @@ public final JobTemplate createJobTemplate(CreateJobTemplateRequest request) { * Creates a job template in the specified region. * *

Sample code: + * + *

{@code
+   * 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();
+   * }
+   * }
*/ public final UnaryCallable createJobTemplateCallable() { return stub.createJobTemplateCallable(); @@ -427,6 +689,17 @@ public final UnaryCallable createJobTempl /** * Lists job templates in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (JobTemplate element : transcoderServiceClient.listJobTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The parent location from which to retrieve the collection of job * templates. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -443,6 +716,17 @@ public final ListJobTemplatesPagedResponse listJobTemplates(LocationName parent) /** * Lists job templates in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (JobTemplate element : transcoderServiceClient.listJobTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The parent location from which to retrieve the collection of job * templates. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -457,6 +741,22 @@ public final ListJobTemplatesPagedResponse listJobTemplates(String parent) { /** * Lists job templates in the specified region. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   ListJobTemplatesRequest request =
+   *       ListJobTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (JobTemplate element : transcoderServiceClient.listJobTemplates(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -469,6 +769,23 @@ public final ListJobTemplatesPagedResponse listJobTemplates(ListJobTemplatesRequ * Lists job templates in the specified region. * *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   ListJobTemplatesRequest request =
+   *       ListJobTemplatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       transcoderServiceClient.listJobTemplatesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (JobTemplate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listJobTemplatesPagedCallable() { @@ -480,6 +797,24 @@ public final ListJobTemplatesPagedResponse listJobTemplates(ListJobTemplatesRequ * Lists job templates in the specified region. * *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   while (true) {
+   *     ListJobTemplatesResponse response =
+   *         transcoderServiceClient.listJobTemplatesCallable().call(request);
+   *     for (JobTemplate element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listJobTemplatesCallable() { @@ -490,6 +825,15 @@ public final ListJobTemplatesPagedResponse listJobTemplates(ListJobTemplatesRequ /** * Returns the job template data. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]");
+   *   JobTemplate response = transcoderServiceClient.getJobTemplate(name);
+   * }
+   * }
+ * * @param name Required. The name of the job template to retrieve. Format: * `projects/{project}/locations/{location}/jobTemplates/{job_template}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -504,6 +848,15 @@ public final JobTemplate getJobTemplate(JobTemplateName name) { /** * Returns the job template data. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   String name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString();
+   *   JobTemplate response = transcoderServiceClient.getJobTemplate(name);
+   * }
+   * }
+ * * @param name Required. The name of the job template to retrieve. Format: * `projects/{project}/locations/{location}/jobTemplates/{job_template}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -517,6 +870,18 @@ public final JobTemplate getJobTemplate(String name) { /** * Returns the job template data. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   GetJobTemplateRequest request =
+   *       GetJobTemplateRequest.newBuilder()
+   *           .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString())
+   *           .build();
+   *   JobTemplate response = transcoderServiceClient.getJobTemplate(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -529,6 +894,19 @@ public final JobTemplate getJobTemplate(GetJobTemplateRequest request) { * Returns the job template data. * *

Sample code: + * + *

{@code
+   * 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();
+   * }
+   * }
*/ public final UnaryCallable getJobTemplateCallable() { return stub.getJobTemplateCallable(); @@ -538,6 +916,15 @@ public final UnaryCallable getJobTemplateCal /** * Deletes a job template. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   JobTemplateName name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]");
+   *   transcoderServiceClient.deleteJobTemplate(name);
+   * }
+   * }
+ * * @param name Required. The name of the job template to delete. * `projects/{project}/locations/{location}/jobTemplates/{job_template}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -554,6 +941,15 @@ public final void deleteJobTemplate(JobTemplateName name) { /** * Deletes a job template. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   String name = JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString();
+   *   transcoderServiceClient.deleteJobTemplate(name);
+   * }
+   * }
+ * * @param name Required. The name of the job template to delete. * `projects/{project}/locations/{location}/jobTemplates/{job_template}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -567,6 +963,18 @@ public final void deleteJobTemplate(String name) { /** * Deletes a job template. * + *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   DeleteJobTemplateRequest request =
+   *       DeleteJobTemplateRequest.newBuilder()
+   *           .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString())
+   *           .build();
+   *   transcoderServiceClient.deleteJobTemplate(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -579,6 +987,19 @@ public final void deleteJobTemplate(DeleteJobTemplateRequest request) { * Deletes a job template. * *

Sample code: + * + *

{@code
+   * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+   *   DeleteJobTemplateRequest request =
+   *       DeleteJobTemplateRequest.newBuilder()
+   *           .setName(JobTemplateName.of("[PROJECT]", "[LOCATION]", "[JOB_TEMPLATE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       transcoderServiceClient.deleteJobTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteJobTemplateCallable() { return stub.deleteJobTemplateCallable(); diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceSettings.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceSettings.java index ee12c358..704e3c29 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceSettings.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceSettings.java @@ -68,6 +68,7 @@ * TranscoderServiceSettings transcoderServiceSettings = transcoderServiceSettingsBuilder.build(); * } */ +@BetaApi @Generated("by gapic-generator-java") public class TranscoderServiceSettings extends ClientSettings { diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/gapic_metadata.json b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/gapic_metadata.json new file mode 100644 index 00000000..79aa4d75 --- /dev/null +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/gapic_metadata.json @@ -0,0 +1,42 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.video.transcoder.v1beta1", + "libraryPackage": "com.google.cloud.video.transcoder.v1beta1", + "services": { + "TranscoderService": { + "clients": { + "grpc": { + "libraryClient": "TranscoderServiceClient", + "rpcs": { + "CreateJob": { + "methods": ["createJob", "createJob", "createJob", "createJobCallable"] + }, + "CreateJobTemplate": { + "methods": ["createJobTemplate", "createJobTemplate", "createJobTemplate", "createJobTemplateCallable"] + }, + "DeleteJob": { + "methods": ["deleteJob", "deleteJob", "deleteJob", "deleteJobCallable"] + }, + "DeleteJobTemplate": { + "methods": ["deleteJobTemplate", "deleteJobTemplate", "deleteJobTemplate", "deleteJobTemplateCallable"] + }, + "GetJob": { + "methods": ["getJob", "getJob", "getJob", "getJobCallable"] + }, + "GetJobTemplate": { + "methods": ["getJobTemplate", "getJobTemplate", "getJobTemplate", "getJobTemplateCallable"] + }, + "ListJobTemplates": { + "methods": ["listJobTemplates", "listJobTemplates", "listJobTemplates", "listJobTemplatesPagedCallable", "listJobTemplatesCallable"] + }, + "ListJobs": { + "methods": ["listJobs", "listJobs", "listJobs", "listJobsPagedCallable", "listJobsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/package-info.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/package-info.java index 83080c28..7f99f214 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/package-info.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/package-info.java @@ -26,6 +26,14 @@ * equalization, content concatenation, and digital ad-stitch ready content generation. * *

Sample for TranscoderServiceClient: + * + *

{@code
+ * try (TranscoderServiceClient transcoderServiceClient = TranscoderServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Job job = Job.newBuilder().build();
+ *   Job response = transcoderServiceClient.createJob(parent, job);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.video.transcoder.v1beta1; diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceCallableFactory.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceCallableFactory.java index 990959f4..180efcc9 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceCallableFactory.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceCallableFactory.java @@ -16,6 +16,7 @@ package com.google.cloud.video.transcoder.v1beta1.stub; +import com.google.api.core.BetaApi; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcCallableFactory; import com.google.api.gax.grpc.GrpcStubCallableFactory; @@ -41,7 +42,8 @@ * *

This class is for advanced usage. */ -@Generated("by gapic-generator") +@BetaApi +@Generated("by gapic-generator-java") public class GrpcTranscoderServiceCallableFactory implements GrpcStubCallableFactory { @Override diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceStub.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceStub.java index e73175cd..076828de 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceStub.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceStub.java @@ -19,6 +19,7 @@ import static com.google.cloud.video.transcoder.v1beta1.TranscoderServiceClient.ListJobTemplatesPagedResponse; import static com.google.cloud.video.transcoder.v1beta1.TranscoderServiceClient.ListJobsPagedResponse; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; @@ -54,6 +55,7 @@ * *

This class is for advanced usage and reflects the underlying API directly. */ +@BetaApi @Generated("by gapic-generator-java") public class GrpcTranscoderServiceStub extends TranscoderServiceStub { private static final MethodDescriptor createJobMethodDescriptor = @@ -340,44 +342,54 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @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; } diff --git a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/TranscoderServiceStub.java b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/TranscoderServiceStub.java index f9e985a3..e6f74aca 100644 --- a/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/TranscoderServiceStub.java +++ b/google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/TranscoderServiceStub.java @@ -19,6 +19,7 @@ import static com.google.cloud.video.transcoder.v1beta1.TranscoderServiceClient.ListJobTemplatesPagedResponse; import static com.google.cloud.video.transcoder.v1beta1.TranscoderServiceClient.ListJobsPagedResponse; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.video.transcoder.v1beta1.CreateJobRequest; @@ -42,7 +43,8 @@ * *

This class is for advanced usage and reflects the underlying API directly. */ -@Generated("by gapic-generator") +@BetaApi +@Generated("by gapic-generator-java") public abstract class TranscoderServiceStub implements BackgroundResource { public UnaryCallable createJobCallable() { diff --git a/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/MockTranscoderServiceImpl.java b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/MockTranscoderServiceImpl.java index b8883801..1e307ced 100644 --- a/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/MockTranscoderServiceImpl.java +++ b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/MockTranscoderServiceImpl.java @@ -69,7 +69,11 @@ public void createJob(CreateJobRequest request, StreamObserver responseObse } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateJob, expected %s or %s", + response.getClass().getName(), Job.class.getName(), Exception.class.getName()))); } } @@ -83,7 +87,13 @@ public void listJobs(ListJobsRequest request, StreamObserver r } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListJobs, expected %s or %s", + response.getClass().getName(), + ListJobsResponse.class.getName(), + Exception.class.getName()))); } } @@ -97,7 +107,11 @@ public void getJob(GetJobRequest request, StreamObserver responseObserver) } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetJob, expected %s or %s", + response.getClass().getName(), Job.class.getName(), Exception.class.getName()))); } } @@ -111,7 +125,13 @@ public void deleteJob(DeleteJobRequest request, StreamObserver responseOb } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteJob, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -126,7 +146,13 @@ public void createJobTemplate( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateJobTemplate, expected %s or %s", + response.getClass().getName(), + JobTemplate.class.getName(), + Exception.class.getName()))); } } @@ -141,7 +167,13 @@ public void listJobTemplates( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListJobTemplates, expected %s or %s", + response.getClass().getName(), + ListJobTemplatesResponse.class.getName(), + Exception.class.getName()))); } } @@ -156,7 +188,13 @@ public void getJobTemplate( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetJobTemplate, expected %s or %s", + response.getClass().getName(), + JobTemplate.class.getName(), + Exception.class.getName()))); } } @@ -171,7 +209,13 @@ public void deleteJobTemplate( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteJobTemplate, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } diff --git a/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClientTest.java b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClientTest.java index d14e9c4b..9feb94ec 100644 --- a/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClientTest.java +++ b/google-cloud-video-transcoder/src/test/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClientTest.java @@ -90,6 +90,7 @@ public void createJobTest() throws Exception { .setInputUri("inputUri470706498") .setOutputUri("outputUri-2119300949") .setPriority(-1165461084) + .setOriginUri(Job.OriginUri.newBuilder().build()) .setProgress(Progress.newBuilder().build()) .setFailureReason("failureReason-1990598546") .addAllFailureDetails(new ArrayList()) @@ -140,6 +141,7 @@ public void createJobTest2() throws Exception { .setInputUri("inputUri470706498") .setOutputUri("outputUri-2119300949") .setPriority(-1165461084) + .setOriginUri(Job.OriginUri.newBuilder().build()) .setProgress(Progress.newBuilder().build()) .setFailureReason("failureReason-1990598546") .addAllFailureDetails(new ArrayList()) @@ -278,6 +280,7 @@ public void getJobTest() throws Exception { .setInputUri("inputUri470706498") .setOutputUri("outputUri-2119300949") .setPriority(-1165461084) + .setOriginUri(Job.OriginUri.newBuilder().build()) .setProgress(Progress.newBuilder().build()) .setFailureReason("failureReason-1990598546") .addAllFailureDetails(new ArrayList()) @@ -325,6 +328,7 @@ public void getJobTest2() throws Exception { .setInputUri("inputUri470706498") .setOutputUri("outputUri-2119300949") .setPriority(-1165461084) + .setOriginUri(Job.OriginUri.newBuilder().build()) .setProgress(Progress.newBuilder().build()) .setFailureReason("failureReason-1990598546") .addAllFailureDetails(new ArrayList()) diff --git a/grpc-google-cloud-video-transcoder-v1beta1/pom.xml b/grpc-google-cloud-video-transcoder-v1beta1/pom.xml index e745dbec..43e72fcb 100644 --- a/grpc-google-cloud-video-transcoder-v1beta1/pom.xml +++ b/grpc-google-cloud-video-transcoder-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1beta1 - 0.1.7 + 0.1.8 grpc-google-cloud-video-transcoder-v1beta1 GRPC library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 0.1.7 + 0.1.8 diff --git a/pom.xml b/pom.xml index c4123621..9cd48391 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-video-transcoder-parent pom - 0.1.7 + 0.1.8 Google Video Transcoder Parent https://github.com/googleapis/java- @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.4 + 0.10.0 @@ -70,23 +70,23 @@ com.google.cloud google-cloud-video-transcoder - 0.1.7 + 0.1.8 com.google.api.grpc proto-google-cloud-video-transcoder-v1beta1 - 0.1.7 + 0.1.8 com.google.api.grpc grpc-google-cloud-video-transcoder-v1beta1 - 0.1.7 + 0.1.8 com.google.cloud google-cloud-shared-dependencies - 0.17.0 + 0.19.0 pom import diff --git a/proto-google-cloud-video-transcoder-v1beta1/pom.xml b/proto-google-cloud-video-transcoder-v1beta1/pom.xml index d4609d1a..e834d351 100644 --- a/proto-google-cloud-video-transcoder-v1beta1/pom.xml +++ b/proto-google-cloud-video-transcoder-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1beta1 - 0.1.7 + 0.1.8 proto-google-cloud-video-transcoder-v1beta1 Proto library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 0.1.7 + 0.1.8 diff --git a/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStream.java b/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStream.java index 31136c60..13154e56 100644 --- a/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStream.java +++ b/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStream.java @@ -957,6 +957,7 @@ public int getBFrameCount() { * the input FPS, and smaller or equal to the target FPS. * The following table shows the computed video FPS given the target FPS (in * parenthesis) and input FPS (in the first column): + * ``` * | | (30) | (60) | (25) | (50) | * |--------|--------|--------|------|------| * | 240 | Fail | Fail | Fail | Fail | @@ -973,6 +974,7 @@ public int getBFrameCount() { * | 15 | 15 | 15 | 20 | 30 | * | 12 | 12 | 12 | 20 | 30 | * | 10 | 10 | 10 | 20 | 30 | + * ``` * * * double frame_rate = 20 [(.google.api.field_behavior) = REQUIRED]; @@ -3389,6 +3391,7 @@ public Builder clearBFrameCount() { * the input FPS, and smaller or equal to the target FPS. * The following table shows the computed video FPS given the target FPS (in * parenthesis) and input FPS (in the first column): + * ``` * | | (30) | (60) | (25) | (50) | * |--------|--------|--------|------|------| * | 240 | Fail | Fail | Fail | Fail | @@ -3405,6 +3408,7 @@ public Builder clearBFrameCount() { * | 15 | 15 | 15 | 20 | 30 | * | 12 | 12 | 12 | 20 | 30 | * | 10 | 10 | 10 | 20 | 30 | + * ``` * * * double frame_rate = 20 [(.google.api.field_behavior) = REQUIRED]; @@ -3425,6 +3429,7 @@ public double getFrameRate() { * the input FPS, and smaller or equal to the target FPS. * The following table shows the computed video FPS given the target FPS (in * parenthesis) and input FPS (in the first column): + * ``` * | | (30) | (60) | (25) | (50) | * |--------|--------|--------|------|------| * | 240 | Fail | Fail | Fail | Fail | @@ -3441,6 +3446,7 @@ public double getFrameRate() { * | 15 | 15 | 15 | 20 | 30 | * | 12 | 12 | 12 | 20 | 30 | * | 10 | 10 | 10 | 20 | 30 | + * ``` * * * double frame_rate = 20 [(.google.api.field_behavior) = REQUIRED]; @@ -3464,6 +3470,7 @@ public Builder setFrameRate(double value) { * the input FPS, and smaller or equal to the target FPS. * The following table shows the computed video FPS given the target FPS (in * parenthesis) and input FPS (in the first column): + * ``` * | | (30) | (60) | (25) | (50) | * |--------|--------|--------|------|------| * | 240 | Fail | Fail | Fail | Fail | @@ -3480,6 +3487,7 @@ public Builder setFrameRate(double value) { * | 15 | 15 | 15 | 20 | 30 | * | 12 | 12 | 12 | 20 | 30 | * | 10 | 10 | 10 | 20 | 30 | + * ``` * * * double frame_rate = 20 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStreamOrBuilder.java b/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStreamOrBuilder.java index 0ee6f072..90900323 100644 --- a/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStreamOrBuilder.java +++ b/proto-google-cloud-video-transcoder-v1beta1/src/main/java/com/google/cloud/video/transcoder/v1beta1/VideoStreamOrBuilder.java @@ -450,6 +450,7 @@ public interface VideoStreamOrBuilder * the input FPS, and smaller or equal to the target FPS. * The following table shows the computed video FPS given the target FPS (in * parenthesis) and input FPS (in the first column): + * ``` * | | (30) | (60) | (25) | (50) | * |--------|--------|--------|------|------| * | 240 | Fail | Fail | Fail | Fail | @@ -466,6 +467,7 @@ public interface VideoStreamOrBuilder * | 15 | 15 | 15 | 20 | 30 | * | 12 | 12 | 12 | 20 | 30 | * | 10 | 10 | 10 | 20 | 30 | + * ``` * * * double frame_rate = 20 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-video-transcoder-v1beta1/src/main/proto/google/cloud/video/transcoder/v1beta1/resources.proto b/proto-google-cloud-video-transcoder-v1beta1/src/main/proto/google/cloud/video/transcoder/v1beta1/resources.proto index 4e2163c9..71ba38f9 100644 --- a/proto-google-cloud-video-transcoder-v1beta1/src/main/proto/google/cloud/video/transcoder/v1beta1/resources.proto +++ b/proto-google-cloud-video-transcoder-v1beta1/src/main/proto/google/cloud/video/transcoder/v1beta1/resources.proto @@ -654,7 +654,7 @@ message VideoStream { // // The following table shows the computed video FPS given the target FPS (in // parenthesis) and input FPS (in the first column): - // + // ``` // | | (30) | (60) | (25) | (50) | // |--------|--------|--------|------|------| // | 240 | Fail | Fail | Fail | Fail | @@ -671,6 +671,7 @@ message VideoStream { // | 15 | 15 | 15 | 20 | 30 | // | 12 | 12 | 12 | 20 | 30 | // | 10 | 10 | 10 | 20 | 30 | + // ``` double frame_rate = 20 [(google.api.field_behavior) = REQUIRED]; // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index dc9707c4..b348d230 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -36,13 +36,13 @@ junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 0c749b85..cc050697 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,20 +28,20 @@ com.google.cloud google-cloud-video-transcoder - 0.1.7 + 0.1.8 junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 8d702511..507ad530 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -34,13 +34,13 @@ junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/synth.metadata b/synth.metadata index 45a83292..fb205df1 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-video-transcoder.git", - "sha": "b94e01a681e1e5583791702ab58e3cf9b5bd2aa2" + "sha": "d643ba3ccbb17c30042540434554dae5ff74a12c" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "857f70daef9f4c38f042fb3dfb7b8423ae18fd19", - "internalRef": "346372957" + "sha": "af8f71dae961ee036a0ac52a1965270149a6b2c9", + "internalRef": "358516065" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928" + "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" } } ], @@ -49,7 +49,6 @@ ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", - ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", @@ -60,7 +59,6 @@ ".kokoro/continuous/java8.cfg", ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", - ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", @@ -92,6 +90,8 @@ ".kokoro/release/promote.sh", ".kokoro/release/publish_javadoc.cfg", ".kokoro/release/publish_javadoc.sh", + ".kokoro/release/publish_javadoc11.cfg", + ".kokoro/release/publish_javadoc11.sh", ".kokoro/release/snapshot.cfg", ".kokoro/release/snapshot.sh", ".kokoro/release/stage.cfg", @@ -103,6 +103,7 @@ "codecov.yaml", "google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceClient.java", "google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/TranscoderServiceSettings.java", + "google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/gapic_metadata.json", "google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/package-info.java", "google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceCallableFactory.java", "google-cloud-video-transcoder/src/main/java/com/google/cloud/video/transcoder/v1beta1/stub/GrpcTranscoderServiceStub.java", diff --git a/versions.txt b/versions.txt index 796f6b88..5dc9eba4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-video-transcoder:0.1.7:0.1.7 -proto-google-cloud-video-transcoder-v1beta1:0.1.7:0.1.7 -grpc-google-cloud-video-transcoder-v1beta1:0.1.7:0.1.7 \ No newline at end of file +google-cloud-video-transcoder:0.1.8:0.1.8 +proto-google-cloud-video-transcoder-v1beta1:0.1.8:0.1.8 +grpc-google-cloud-video-transcoder-v1beta1:0.1.8:0.1.8 \ No newline at end of file