Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

feat: add support for user labels for job and job template #352

Merged
merged 2 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -93,6 +94,7 @@ public void createJobTest() throws Exception {
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setTtlAfterCompletionDays(107576420)
.putAllLabels(new HashMap<String, String>())
.setError(Status.newBuilder().build())
.build();
mockTranscoderService.addResponse(expectedResponse);
Expand Down Expand Up @@ -141,6 +143,7 @@ public void createJobTest2() throws Exception {
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setTtlAfterCompletionDays(107576420)
.putAllLabels(new HashMap<String, String>())
.setError(Status.newBuilder().build())
.build();
mockTranscoderService.addResponse(expectedResponse);
Expand Down Expand Up @@ -277,6 +280,7 @@ public void getJobTest() throws Exception {
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setTtlAfterCompletionDays(107576420)
.putAllLabels(new HashMap<String, String>())
.setError(Status.newBuilder().build())
.build();
mockTranscoderService.addResponse(expectedResponse);
Expand Down Expand Up @@ -322,6 +326,7 @@ public void getJobTest2() throws Exception {
.setStartTime(Timestamp.newBuilder().build())
.setEndTime(Timestamp.newBuilder().build())
.setTtlAfterCompletionDays(107576420)
.putAllLabels(new HashMap<String, String>())
.setError(Status.newBuilder().build())
.build();
mockTranscoderService.addResponse(expectedResponse);
Expand Down Expand Up @@ -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<String, String>())
.build();
mockTranscoderService.addResponse(expectedResponse);

Expand Down Expand Up @@ -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<String, String>())
.build();
mockTranscoderService.addResponse(expectedResponse);

Expand Down Expand Up @@ -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<String, String>())
.build();
mockTranscoderService.addResponse(expectedResponse);

Expand Down Expand Up @@ -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<String, String>())
.build();
mockTranscoderService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ public com.google.protobuf.ByteString getKeyBytes() {
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -222,7 +224,9 @@ public java.lang.String getUri() {
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down Expand Up @@ -769,7 +773,9 @@ public Builder setKeyBytes(com.google.protobuf.ByteString value) {
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -793,7 +799,9 @@ public java.lang.String getUri() {
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -817,7 +825,9 @@ public com.google.protobuf.ByteString getUriBytes() {
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -840,7 +850,9 @@ public Builder setUri(java.lang.String value) {
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -859,7 +871,9 @@ public Builder clearUri() {
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public interface InputOrBuilder
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -70,7 +72,9 @@ public interface InputOrBuilder
* <pre>
* 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).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down
Loading