Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 1509f5c

Browse files
fix: update nodejs package name to video-transcoder (#119)
docs: clarify that project number is used as the canonical project identifier for job and job template names docs: fix broken link and code formatting feat: add support for allow_missing param on DELETE request fix: remove Encryption settings that were published due to a sync issue BREAKING CHANGE: requests specifying Encryption settings are rejected by the server PiperOrigin-RevId: 401033248 PiperOrigin-RevId: 402666373 Source-Link: googleapis/googleapis@7bfeecb Source-Link: https://github.com/googleapis/googleapis-gen/commit/ecb2e76de83851ff4c4808476a8c2080dd562c21 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWNiMmU3NmRlODM4NTFmZjRjNDgwODQ3NmE4YzIwODBkZDU2MmMyMSJ9
1 parent 8fb153e commit 1509f5c

24 files changed

+1339
-1742
lines changed

protos/google/cloud/video/transcoder/v1/resources.proto

Lines changed: 140 additions & 182 deletions
Large diffs are not rendered by default.

protos/google/cloud/video/transcoder/v1/services.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ message DeleteJobRequest {
172172
type: "transcoder.googleapis.com/Job"
173173
}
174174
];
175+
176+
// If set to true, and the job is not found, the request will succeed but no
177+
// action will be taken on the server.
178+
bool allow_missing = 2;
175179
}
176180

177181
// Response message for `TranscoderService.ListJobs`.
@@ -258,6 +262,10 @@ message DeleteJobTemplateRequest {
258262
type: "transcoder.googleapis.com/JobTemplate"
259263
}
260264
];
265+
266+
// If set to true, and the job template is not found, the request will succeed
267+
// but no action will be taken on the server.
268+
bool allow_missing = 2;
261269
}
262270

263271
// Response message for `TranscoderService.ListJobTemplates`.

protos/protos.d.ts

Lines changed: 12 additions & 402 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.js

Lines changed: 174 additions & 1064 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.json

Lines changed: 8 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
16+
17+
function main(parent, job) {
18+
// [START transcoder_v1_generated_TranscoderService_CreateJob_async]
19+
/**
20+
* TODO(developer): Uncomment these variables before running the sample.
21+
*/
22+
/**
23+
* Required. The parent location to create and process this job.
24+
* Format: `projects/{project}/locations/{location}`
25+
*/
26+
// const parent = 'abc123'
27+
/**
28+
* Required. Parameters for creating transcoding job.
29+
*/
30+
// const job = ''
31+
32+
// Imports the Transcoder library
33+
const {TranscoderServiceClient} =
34+
require('@google-cloud/video-transcoder').v1;
35+
36+
// Instantiates a client
37+
const transcoderClient = new TranscoderServiceClient();
38+
39+
async function createJob() {
40+
// Construct request
41+
const request = {
42+
parent,
43+
job,
44+
};
45+
46+
// Run request
47+
const response = await transcoderClient.createJob(request);
48+
console.log(response);
49+
}
50+
51+
createJob();
52+
// [END transcoder_v1_generated_TranscoderService_CreateJob_async]
53+
}
54+
55+
process.on('unhandledRejection', err => {
56+
console.error(err.message);
57+
process.exitCode = 1;
58+
});
59+
main(...process.argv.slice(2));
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
16+
17+
function main(parent, jobTemplate, jobTemplateId) {
18+
// [START transcoder_v1_generated_TranscoderService_CreateJobTemplate_async]
19+
/**
20+
* TODO(developer): Uncomment these variables before running the sample.
21+
*/
22+
/**
23+
* Required. The parent location to create this job template.
24+
* Format: `projects/{project}/locations/{location}`
25+
*/
26+
// const parent = 'abc123'
27+
/**
28+
* Required. Parameters for creating job template.
29+
*/
30+
// const jobTemplate = ''
31+
/**
32+
* Required. The ID to use for the job template, which will become the final component
33+
* of the job template's resource name.
34+
* This value should be 4-63 characters, and valid characters must match the
35+
* regular expression `[a-zA-Z][a-zA-Z0-9_-]*`.
36+
*/
37+
// const jobTemplateId = 'abc123'
38+
39+
// Imports the Transcoder library
40+
const {TranscoderServiceClient} =
41+
require('@google-cloud/video-transcoder').v1;
42+
43+
// Instantiates a client
44+
const transcoderClient = new TranscoderServiceClient();
45+
46+
async function createJobTemplate() {
47+
// Construct request
48+
const request = {
49+
parent,
50+
jobTemplate,
51+
jobTemplateId,
52+
};
53+
54+
// Run request
55+
const response = await transcoderClient.createJobTemplate(request);
56+
console.log(response);
57+
}
58+
59+
createJobTemplate();
60+
// [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_async]
61+
}
62+
63+
process.on('unhandledRejection', err => {
64+
console.error(err.message);
65+
process.exitCode = 1;
66+
});
67+
main(...process.argv.slice(2));
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
16+
17+
function main(name) {
18+
// [START transcoder_v1_generated_TranscoderService_DeleteJob_async]
19+
/**
20+
* TODO(developer): Uncomment these variables before running the sample.
21+
*/
22+
/**
23+
* Required. The name of the job to delete.
24+
* Format: `projects/{project}/locations/{location}/jobs/{job}`
25+
*/
26+
// const name = 'abc123'
27+
/**
28+
* If set to true, and the job is not found, the request will succeed but no
29+
* action will be taken on the server.
30+
*/
31+
// const allowMissing = true
32+
33+
// Imports the Transcoder library
34+
const {TranscoderServiceClient} =
35+
require('@google-cloud/video-transcoder').v1;
36+
37+
// Instantiates a client
38+
const transcoderClient = new TranscoderServiceClient();
39+
40+
async function deleteJob() {
41+
// Construct request
42+
const request = {
43+
name,
44+
};
45+
46+
// Run request
47+
const response = await transcoderClient.deleteJob(request);
48+
console.log(response);
49+
}
50+
51+
deleteJob();
52+
// [END transcoder_v1_generated_TranscoderService_DeleteJob_async]
53+
}
54+
55+
process.on('unhandledRejection', err => {
56+
console.error(err.message);
57+
process.exitCode = 1;
58+
});
59+
main(...process.argv.slice(2));
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
16+
17+
function main(name) {
18+
// [START transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async]
19+
/**
20+
* TODO(developer): Uncomment these variables before running the sample.
21+
*/
22+
/**
23+
* Required. The name of the job template to delete.
24+
* `projects/{project}/locations/{location}/jobTemplates/{job_template}`
25+
*/
26+
// const name = 'abc123'
27+
/**
28+
* If set to true, and the job template is not found, the request will succeed
29+
* but no action will be taken on the server.
30+
*/
31+
// const allowMissing = true
32+
33+
// Imports the Transcoder library
34+
const {TranscoderServiceClient} =
35+
require('@google-cloud/video-transcoder').v1;
36+
37+
// Instantiates a client
38+
const transcoderClient = new TranscoderServiceClient();
39+
40+
async function deleteJobTemplate() {
41+
// Construct request
42+
const request = {
43+
name,
44+
};
45+
46+
// Run request
47+
const response = await transcoderClient.deleteJobTemplate(request);
48+
console.log(response);
49+
}
50+
51+
deleteJobTemplate();
52+
// [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async]
53+
}
54+
55+
process.on('unhandledRejection', err => {
56+
console.error(err.message);
57+
process.exitCode = 1;
58+
});
59+
main(...process.argv.slice(2));

0 commit comments

Comments
 (0)