Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
322 changes: 140 additions & 182 deletions protos/google/cloud/video/transcoder/v1/resources.proto

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions protos/google/cloud/video/transcoder/v1/services.proto
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ message DeleteJobRequest {
type: "transcoder.googleapis.com/Job"
}
];

// If set to true, and the job is not found, the request will succeed but no
// action will be taken on the server.
bool allow_missing = 2;
}

// Response message for `TranscoderService.ListJobs`.
Expand Down Expand Up @@ -258,6 +262,10 @@ message DeleteJobTemplateRequest {
type: "transcoder.googleapis.com/JobTemplate"
}
];

// If set to true, and the job template is not found, the request will succeed
// but no action will be taken on the server.
bool allow_missing = 2;
}

// Response message for `TranscoderService.ListJobTemplates`.
Expand Down
414 changes: 12 additions & 402 deletions protos/protos.d.ts

Large diffs are not rendered by default.

1,238 changes: 174 additions & 1,064 deletions protos/protos.js

Large diffs are not rendered by default.

93 changes: 8 additions & 85 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions samples/generated/v1/transcoder_service.create_job.js
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 samples/generated/v1/transcoder_service.create_job_template.js
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));
59 changes: 59 additions & 0 deletions samples/generated/v1/transcoder_service.delete_job.js
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 samples/generated/v1/transcoder_service.delete_job_template.js
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));
Loading