Class TranscoderServiceClient (1.69.0)
Stay organized with collections
Save and categorize content based on your preferences.
- 1.79.0 (latest)
- 1.77.0
- 1.75.0
- 1.74.0
- 1.73.0
- 1.72.0
- 1.71.0
- 1.69.0
- 1.67.0
- 1.66.0
- 1.63.0
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.5
- 1.0.4
- 0.4.3
Service Description: Using the Transcoder API, you can queue asynchronous jobs for transcoding media into various output formats. Output formats may include different streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can also customize jobs using advanced features such as Digital Rights Management (DRM), audio equalization, content concatenation, and digital ad-stitch ready content generation.
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Jobjob=Job.newBuilder().build();
Jobresponse=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().
| Method | Description | Method Variants |
|---|---|---|
CreateJob |
Creates a job in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListJobs |
Lists jobs in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetJob |
Returns the job data. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteJob |
Deletes a job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateJobTemplate |
Creates a job template in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListJobTemplates |
Lists job templates in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetJobTemplate |
Returns the job template data. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteJobTemplate |
Deletes a job template. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of TranscoderServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
TranscoderServiceSettingstranscoderServiceSettings=
TranscoderServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
TranscoderServiceClienttranscoderServiceClient=
TranscoderServiceClient.create(transcoderServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
TranscoderServiceSettingstranscoderServiceSettings=
TranscoderServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
TranscoderServiceClienttranscoderServiceClient=
TranscoderServiceClient.create(transcoderServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
TranscoderServiceSettingstranscoderServiceSettings=
TranscoderServiceSettings.newHttpJsonBuilder().build();
TranscoderServiceClienttranscoderServiceClient=
TranscoderServiceClient.create(transcoderServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
publicstaticfinalTranscoderServiceClientcreate()Constructs an instance of TranscoderServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(TranscoderServiceSettings settings)
publicstaticfinalTranscoderServiceClientcreate(TranscoderServiceSettingssettings)Constructs an instance of TranscoderServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
TranscoderServiceSettings |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(TranscoderServiceStub stub)
publicstaticfinalTranscoderServiceClientcreate(TranscoderServiceStubstub)Constructs an instance of TranscoderServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(TranscoderServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
TranscoderServiceStub |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient |
|
Constructors
TranscoderServiceClient(TranscoderServiceSettings settings)
protectedTranscoderServiceClient(TranscoderServiceSettingssettings)Constructs an instance of TranscoderServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
TranscoderServiceSettings |
TranscoderServiceClient(TranscoderServiceStub stub)
protectedTranscoderServiceClient(TranscoderServiceStubstub)| Parameter | |
|---|---|
| Name | Description |
stub |
TranscoderServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
publicbooleanawaitTermination(longduration,TimeUnitunit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
publicfinalvoidclose()createJob(CreateJobRequest request)
publicfinalJobcreateJob(CreateJobRequestrequest)Creates a job in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
CreateJobRequestrequest=
CreateJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setJob(Job.newBuilder().build())
.build();
Jobresponse=transcoderServiceClient.createJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateJobRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Job |
|
createJob(LocationName parent, Job job)
publicfinalJobcreateJob(LocationNameparent,Jobjob)Creates a job in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Jobjob=Job.newBuilder().build();
Jobresponse=transcoderServiceClient.createJob(parent,job);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. The parent location to create and process this job. Format:
|
job |
Job Required. Parameters for creating transcoding job. |
| Returns | |
|---|---|
| Type | Description |
Job |
|
createJob(String parent, Job job)
publicfinalJobcreateJob(Stringparent,Jobjob)Creates a job in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
Jobjob=Job.newBuilder().build();
Jobresponse=transcoderServiceClient.createJob(parent,job);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. The parent location to create and process this job. Format:
|
job |
Job Required. Parameters for creating transcoding job. |
| Returns | |
|---|---|
| Type | Description |
Job |
|
createJobCallable()
publicfinalUnaryCallable<CreateJobRequest,Job>createJobCallable()Creates a job in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
CreateJobRequestrequest=
CreateJobRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setJob(Job.newBuilder().build())
.build();
ApiFuture<Job>future=transcoderServiceClient.createJobCallable().futureCall(request);
// Do something.
Jobresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateJobRequest,Job> |
|
createJobTemplate(CreateJobTemplateRequest request)
publicfinalJobTemplatecreateJobTemplate(CreateJobTemplateRequestrequest)Creates a job template in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
CreateJobTemplateRequestrequest=
CreateJobTemplateRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setJobTemplate(JobTemplate.newBuilder().build())
.setJobTemplateId("jobTemplateId-597733678")
.build();
JobTemplateresponse=transcoderServiceClient.createJobTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateJobTemplateRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
JobTemplate |
|
createJobTemplate(LocationName parent, JobTemplate jobTemplate, String jobTemplateId)
publicfinalJobTemplatecreateJobTemplate(LocationNameparent,JobTemplatejobTemplate,StringjobTemplateId)Creates a job template in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
JobTemplatejobTemplate=JobTemplate.newBuilder().build();
StringjobTemplateId="jobTemplateId-597733678";
JobTemplateresponse=
transcoderServiceClient.createJobTemplate(parent,jobTemplate,jobTemplateId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. The parent location to create this job template. Format:
|
jobTemplate |
JobTemplate Required. Parameters for creating job template. |
jobTemplateId |
String 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 |
| Returns | |
|---|---|
| Type | Description |
JobTemplate |
|
createJobTemplate(String parent, JobTemplate jobTemplate, String jobTemplateId)
publicfinalJobTemplatecreateJobTemplate(Stringparent,JobTemplatejobTemplate,StringjobTemplateId)Creates a job template in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
JobTemplatejobTemplate=JobTemplate.newBuilder().build();
StringjobTemplateId="jobTemplateId-597733678";
JobTemplateresponse=
transcoderServiceClient.createJobTemplate(parent,jobTemplate,jobTemplateId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. The parent location to create this job template. Format:
|
jobTemplate |
JobTemplate Required. Parameters for creating job template. |
jobTemplateId |
String 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 |
| Returns | |
|---|---|
| Type | Description |
JobTemplate |
|
createJobTemplateCallable()
publicfinalUnaryCallable<CreateJobTemplateRequest,JobTemplate>createJobTemplateCallable()Creates a job template in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
CreateJobTemplateRequestrequest=
CreateJobTemplateRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setJobTemplate(JobTemplate.newBuilder().build())
.setJobTemplateId("jobTemplateId-597733678")
.build();
ApiFuture<JobTemplate>future=
transcoderServiceClient.createJobTemplateCallable().futureCall(request);
// Do something.
JobTemplateresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateJobTemplateRequest,JobTemplate> |
|
deleteJob(DeleteJobRequest request)
publicfinalvoiddeleteJob(DeleteJobRequestrequest)Deletes a job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
DeleteJobRequestrequest=
DeleteJobRequest.newBuilder()
.setName(JobName.of("[PROJECT]","[LOCATION]","[JOB]").toString())
.setAllowMissing(true)
.build();
transcoderServiceClient.deleteJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteJobRequest The request object containing all of the parameters for the API call. |
deleteJob(JobName name)
publicfinalvoiddeleteJob(JobNamename)Deletes a job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
JobNamename=JobName.of("[PROJECT]","[LOCATION]","[JOB]");
transcoderServiceClient.deleteJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
JobName Required. The name of the job to delete. Format:
|
deleteJob(String name)
publicfinalvoiddeleteJob(Stringname)Deletes a job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringname=JobName.of("[PROJECT]","[LOCATION]","[JOB]").toString();
transcoderServiceClient.deleteJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. The name of the job to delete. Format:
|
deleteJobCallable()
publicfinalUnaryCallable<DeleteJobRequest,Empty>deleteJobCallable()Deletes a job.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
DeleteJobRequestrequest=
DeleteJobRequest.newBuilder()
.setName(JobName.of("[PROJECT]","[LOCATION]","[JOB]").toString())
.setAllowMissing(true)
.build();
ApiFuture<Empty>future=transcoderServiceClient.deleteJobCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteJobRequest,Empty> |
|
deleteJobTemplate(DeleteJobTemplateRequest request)
publicfinalvoiddeleteJobTemplate(DeleteJobTemplateRequestrequest)Deletes a job template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
DeleteJobTemplateRequestrequest=
DeleteJobTemplateRequest.newBuilder()
.setName(JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]").toString())
.setAllowMissing(true)
.build();
transcoderServiceClient.deleteJobTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteJobTemplateRequest The request object containing all of the parameters for the API call. |
deleteJobTemplate(JobTemplateName name)
publicfinalvoiddeleteJobTemplate(JobTemplateNamename)Deletes a job template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
JobTemplateNamename=JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]");
transcoderServiceClient.deleteJobTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
JobTemplateName Required. The name of the job template to delete.
|
deleteJobTemplate(String name)
publicfinalvoiddeleteJobTemplate(Stringname)Deletes a job template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringname=JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]").toString();
transcoderServiceClient.deleteJobTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. The name of the job template to delete.
|
deleteJobTemplateCallable()
publicfinalUnaryCallable<DeleteJobTemplateRequest,Empty>deleteJobTemplateCallable()Deletes a job template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
DeleteJobTemplateRequestrequest=
DeleteJobTemplateRequest.newBuilder()
.setName(JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]").toString())
.setAllowMissing(true)
.build();
ApiFuture<Empty>future=
transcoderServiceClient.deleteJobTemplateCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteJobTemplateRequest,Empty> |
|
getJob(GetJobRequest request)
publicfinalJobgetJob(GetJobRequestrequest)Returns the job data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
GetJobRequestrequest=
GetJobRequest.newBuilder()
.setName(JobName.of("[PROJECT]","[LOCATION]","[JOB]").toString())
.build();
Jobresponse=transcoderServiceClient.getJob(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetJobRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Job |
|
getJob(JobName name)
publicfinalJobgetJob(JobNamename)Returns the job data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
JobNamename=JobName.of("[PROJECT]","[LOCATION]","[JOB]");
Jobresponse=transcoderServiceClient.getJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
JobName Required. The name of the job to retrieve. Format:
|
| Returns | |
|---|---|
| Type | Description |
Job |
|
getJob(String name)
publicfinalJobgetJob(Stringname)Returns the job data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringname=JobName.of("[PROJECT]","[LOCATION]","[JOB]").toString();
Jobresponse=transcoderServiceClient.getJob(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. The name of the job to retrieve. Format:
|
| Returns | |
|---|---|
| Type | Description |
Job |
|
getJobCallable()
publicfinalUnaryCallable<GetJobRequest,Job>getJobCallable()Returns the job data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
GetJobRequestrequest=
GetJobRequest.newBuilder()
.setName(JobName.of("[PROJECT]","[LOCATION]","[JOB]").toString())
.build();
ApiFuture<Job>future=transcoderServiceClient.getJobCallable().futureCall(request);
// Do something.
Jobresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetJobRequest,Job> |
|
getJobTemplate(GetJobTemplateRequest request)
publicfinalJobTemplategetJobTemplate(GetJobTemplateRequestrequest)Returns the job template data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
GetJobTemplateRequestrequest=
GetJobTemplateRequest.newBuilder()
.setName(JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]").toString())
.build();
JobTemplateresponse=transcoderServiceClient.getJobTemplate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetJobTemplateRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
JobTemplate |
|
getJobTemplate(JobTemplateName name)
publicfinalJobTemplategetJobTemplate(JobTemplateNamename)Returns the job template data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
JobTemplateNamename=JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]");
JobTemplateresponse=transcoderServiceClient.getJobTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
JobTemplateName Required. The name of the job template to retrieve. Format:
|
| Returns | |
|---|---|
| Type | Description |
JobTemplate |
|
getJobTemplate(String name)
publicfinalJobTemplategetJobTemplate(Stringname)Returns the job template data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringname=JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]").toString();
JobTemplateresponse=transcoderServiceClient.getJobTemplate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. The name of the job template to retrieve. Format:
|
| Returns | |
|---|---|
| Type | Description |
JobTemplate |
|
getJobTemplateCallable()
publicfinalUnaryCallable<GetJobTemplateRequest,JobTemplate>getJobTemplateCallable()Returns the job template data.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
GetJobTemplateRequestrequest=
GetJobTemplateRequest.newBuilder()
.setName(JobTemplateName.of("[PROJECT]","[LOCATION]","[JOB_TEMPLATE]").toString())
.build();
ApiFuture<JobTemplate>future=
transcoderServiceClient.getJobTemplateCallable().futureCall(request);
// Do something.
JobTemplateresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetJobTemplateRequest,JobTemplate> |
|
getSettings()
publicfinalTranscoderServiceSettingsgetSettings()| Returns | |
|---|---|
| Type | Description |
TranscoderServiceSettings |
|
getStub()
publicTranscoderServiceStubgetStub()| Returns | |
|---|---|
| Type | Description |
TranscoderServiceStub |
|
isShutdown()
publicbooleanisShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
publicbooleanisTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listJobTemplates(ListJobTemplatesRequest request)
publicfinalTranscoderServiceClient.ListJobTemplatesPagedResponselistJobTemplates(ListJobTemplatesRequestrequest)Lists job templates in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
ListJobTemplatesRequestrequest=
ListJobTemplatesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(JobTemplateelement:transcoderServiceClient.listJobTemplates(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListJobTemplatesRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient.ListJobTemplatesPagedResponse |
|
listJobTemplates(LocationName parent)
publicfinalTranscoderServiceClient.ListJobTemplatesPagedResponselistJobTemplates(LocationNameparent)Lists job templates in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(JobTemplateelement:transcoderServiceClient.listJobTemplates(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. The parent location from which to retrieve the collection of job
templates. Format: |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient.ListJobTemplatesPagedResponse |
|
listJobTemplates(String parent)
publicfinalTranscoderServiceClient.ListJobTemplatesPagedResponselistJobTemplates(Stringparent)Lists job templates in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(JobTemplateelement:transcoderServiceClient.listJobTemplates(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. The parent location from which to retrieve the collection of job
templates. Format: |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient.ListJobTemplatesPagedResponse |
|
listJobTemplatesCallable()
publicfinalUnaryCallable<ListJobTemplatesRequest,ListJobTemplatesResponse>listJobTemplatesCallable()Lists job templates in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
ListJobTemplatesRequestrequest=
ListJobTemplatesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListJobTemplatesResponseresponse=
transcoderServiceClient.listJobTemplatesCallable().call(request);
for(JobTemplateelement:response.getJobTemplatesList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListJobTemplatesRequest,ListJobTemplatesResponse> |
|
listJobTemplatesPagedCallable()
publicfinalUnaryCallable<ListJobTemplatesRequest,TranscoderServiceClient.ListJobTemplatesPagedResponse>listJobTemplatesPagedCallable()Lists job templates in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
ListJobTemplatesRequestrequest=
ListJobTemplatesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<JobTemplate>future=
transcoderServiceClient.listJobTemplatesPagedCallable().futureCall(request);
// Do something.
for(JobTemplateelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListJobTemplatesRequest,ListJobTemplatesPagedResponse> |
|
listJobs(ListJobsRequest request)
publicfinalTranscoderServiceClient.ListJobsPagedResponselistJobs(ListJobsRequestrequest)Lists jobs in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
ListJobsRequestrequest=
ListJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Jobelement:transcoderServiceClient.listJobs(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListJobsRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient.ListJobsPagedResponse |
|
listJobs(LocationName parent)
publicfinalTranscoderServiceClient.ListJobsPagedResponselistJobs(LocationNameparent)Lists jobs in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(Jobelement:transcoderServiceClient.listJobs(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. Format: |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient.ListJobsPagedResponse |
|
listJobs(String parent)
publicfinalTranscoderServiceClient.ListJobsPagedResponselistJobs(Stringparent)Lists jobs in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(Jobelement:transcoderServiceClient.listJobs(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Format: |
| Returns | |
|---|---|
| Type | Description |
TranscoderServiceClient.ListJobsPagedResponse |
|
listJobsCallable()
publicfinalUnaryCallable<ListJobsRequest,ListJobsResponse>listJobsCallable()Lists jobs in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
ListJobsRequestrequest=
ListJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListJobsResponseresponse=transcoderServiceClient.listJobsCallable().call(request);
for(Jobelement:response.getJobsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListJobsRequest,ListJobsResponse> |
|
listJobsPagedCallable()
publicfinalUnaryCallable<ListJobsRequest,TranscoderServiceClient.ListJobsPagedResponse>listJobsPagedCallable()Lists jobs in the specified region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(TranscoderServiceClienttranscoderServiceClient=TranscoderServiceClient.create()){
ListJobsRequestrequest=
ListJobsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Job>future=transcoderServiceClient.listJobsPagedCallable().futureCall(request);
// Do something.
for(Jobelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListJobsRequest,ListJobsPagedResponse> |
|
shutdown()
publicvoidshutdown()shutdownNow()
publicvoidshutdownNow()