This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
8fb153e
commit 1509f5c
Showing
24 changed files
with
1,339 additions
and
1,742 deletions.
There are no files selected for viewing
322 changes: 140 additions & 182 deletions
322
protos/google/cloud/video/transcoder/v1/resources.proto
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2021 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. | ||
|
||
'use strict'; | ||
|
||
function main(parent, job) { | ||
// [START transcoder_v1_generated_TranscoderService_CreateJob_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The parent location to create and process this job. | ||
* Format: `projects/{project}/locations/{location}` | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. Parameters for creating transcoding job. | ||
*/ | ||
// const job = '' | ||
|
||
// Imports the Transcoder library | ||
const {TranscoderServiceClient} = | ||
require('@google-cloud/video-transcoder').v1; | ||
|
||
// Instantiates a client | ||
const transcoderClient = new TranscoderServiceClient(); | ||
|
||
async function createJob() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
job, | ||
}; | ||
|
||
// Run request | ||
const response = await transcoderClient.createJob(request); | ||
console.log(response); | ||
} | ||
|
||
createJob(); | ||
// [END transcoder_v1_generated_TranscoderService_CreateJob_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
67 changes: 67 additions & 0 deletions
67
samples/generated/v1/transcoder_service.create_job_template.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright 2021 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. | ||
|
||
'use strict'; | ||
|
||
function main(parent, jobTemplate, jobTemplateId) { | ||
// [START transcoder_v1_generated_TranscoderService_CreateJobTemplate_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The parent location to create this job template. | ||
* Format: `projects/{project}/locations/{location}` | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Required. Parameters for creating job template. | ||
*/ | ||
// const jobTemplate = '' | ||
/** | ||
* Required. The ID to use for the job template, which will become the final component | ||
* of the job template's resource name. | ||
* This value should be 4-63 characters, and valid characters must match the | ||
* regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. | ||
*/ | ||
// const jobTemplateId = 'abc123' | ||
|
||
// Imports the Transcoder library | ||
const {TranscoderServiceClient} = | ||
require('@google-cloud/video-transcoder').v1; | ||
|
||
// Instantiates a client | ||
const transcoderClient = new TranscoderServiceClient(); | ||
|
||
async function createJobTemplate() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
jobTemplate, | ||
jobTemplateId, | ||
}; | ||
|
||
// Run request | ||
const response = await transcoderClient.createJobTemplate(request); | ||
console.log(response); | ||
} | ||
|
||
createJobTemplate(); | ||
// [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2021 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. | ||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START transcoder_v1_generated_TranscoderService_DeleteJob_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The name of the job to delete. | ||
* Format: `projects/{project}/locations/{location}/jobs/{job}` | ||
*/ | ||
// const name = 'abc123' | ||
/** | ||
* If set to true, and the job is not found, the request will succeed but no | ||
* action will be taken on the server. | ||
*/ | ||
// const allowMissing = true | ||
|
||
// Imports the Transcoder library | ||
const {TranscoderServiceClient} = | ||
require('@google-cloud/video-transcoder').v1; | ||
|
||
// Instantiates a client | ||
const transcoderClient = new TranscoderServiceClient(); | ||
|
||
async function deleteJob() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const response = await transcoderClient.deleteJob(request); | ||
console.log(response); | ||
} | ||
|
||
deleteJob(); | ||
// [END transcoder_v1_generated_TranscoderService_DeleteJob_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
59 changes: 59 additions & 0 deletions
59
samples/generated/v1/transcoder_service.delete_job_template.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2021 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. | ||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The name of the job template to delete. | ||
* `projects/{project}/locations/{location}/jobTemplates/{job_template}` | ||
*/ | ||
// const name = 'abc123' | ||
/** | ||
* If set to true, and the job template is not found, the request will succeed | ||
* but no action will be taken on the server. | ||
*/ | ||
// const allowMissing = true | ||
|
||
// Imports the Transcoder library | ||
const {TranscoderServiceClient} = | ||
require('@google-cloud/video-transcoder').v1; | ||
|
||
// Instantiates a client | ||
const transcoderClient = new TranscoderServiceClient(); | ||
|
||
async function deleteJobTemplate() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const response = await transcoderClient.deleteJobTemplate(request); | ||
console.log(response); | ||
} | ||
|
||
deleteJobTemplate(); | ||
// [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
Oops, something went wrong.