Reference documentation and code samples for the Transcoder V1 API class Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.
REST client for the TranscoderService service.
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.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the TranscoderService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all TranscoderService clients ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the TranscoderService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_job
def create_job(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
def create_job(parent: nil, job: nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
Creates a job in the specified region.
def create_job(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
create_job
via a request object, either of type
CreateJobRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::CreateJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_job(parent: nil, job: nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
create_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent location to create and process this job.
Format:
projects/{project}/locations/{location}
- job (::Google::Cloud::Video::Transcoder::V1::Job, ::Hash) — Required. Parameters for creating transcoding job.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Video::Transcoder::V1::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::CreateJobRequest.new # Call the create_job method. result = client.create_job request # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. p result
#create_job_template
def create_job_template(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
def create_job_template(parent: nil, job_template: nil, job_template_id: nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
Creates a job template in the specified region.
def create_job_template(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
create_job_template
via a request object, either of type
CreateJobTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_job_template(parent: nil, job_template: nil, job_template_id: nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
create_job_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent location to create this job template.
Format:
projects/{project}/locations/{location}
- job_template (::Google::Cloud::Video::Transcoder::V1::JobTemplate, ::Hash) — Required. Parameters for creating job template.
-
job_template_id (::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
[a-zA-Z][a-zA-Z0-9_-]*
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Video::Transcoder::V1::JobTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::CreateJobTemplateRequest.new # Call the create_job_template method. result = client.create_job_template request # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. p result
#delete_job
def delete_job(request, options = nil) -> ::Google::Protobuf::Empty
def delete_job(name: nil, allow_missing: nil) -> ::Google::Protobuf::Empty
Deletes a job.
def delete_job(request, options = nil) -> ::Google::Protobuf::Empty
delete_job
via a request object, either of type
DeleteJobRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::DeleteJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_job(name: nil, allow_missing: nil) -> ::Google::Protobuf::Empty
delete_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the job to delete.
Format:
projects/{project}/locations/{location}/jobs/{job}
- allow_missing (::Boolean) — If set to true, and the job is not found, the request will succeed but no action will be taken on the server.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::DeleteJobRequest.new # Call the delete_job method. result = client.delete_job request # The returned object is of type Google::Protobuf::Empty. p result
#delete_job_template
def delete_job_template(request, options = nil) -> ::Google::Protobuf::Empty
def delete_job_template(name: nil, allow_missing: nil) -> ::Google::Protobuf::Empty
Deletes a job template.
def delete_job_template(request, options = nil) -> ::Google::Protobuf::Empty
delete_job_template
via a request object, either of type
DeleteJobTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_job_template(name: nil, allow_missing: nil) -> ::Google::Protobuf::Empty
delete_job_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the job template to delete.
projects/{project}/locations/{location}/jobTemplates/{job_template}
- allow_missing (::Boolean) — If set to true, and the job template is not found, the request will succeed but no action will be taken on the server.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::DeleteJobTemplateRequest.new # Call the delete_job_template method. result = client.delete_job_template request # The returned object is of type Google::Protobuf::Empty. p result
#get_job
def get_job(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
def get_job(name: nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
Returns the job data.
def get_job(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
get_job
via a request object, either of type
GetJobRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::GetJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_job(name: nil) -> ::Google::Cloud::Video::Transcoder::V1::Job
get_job
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the job to retrieve.
Format:
projects/{project}/locations/{location}/jobs/{job}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Video::Transcoder::V1::Job)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::GetJobRequest.new # Call the get_job method. result = client.get_job request # The returned object is of type Google::Cloud::Video::Transcoder::V1::Job. p result
#get_job_template
def get_job_template(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
def get_job_template(name: nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
Returns the job template data.
def get_job_template(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
get_job_template
via a request object, either of type
GetJobTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_job_template(name: nil) -> ::Google::Cloud::Video::Transcoder::V1::JobTemplate
get_job_template
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the job template to retrieve.
Format:
projects/{project}/locations/{location}/jobTemplates/{job_template}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Video::Transcoder::V1::JobTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::GetJobTemplateRequest.new # Call the get_job_template method. result = client.get_job_template request # The returned object is of type Google::Cloud::Video::Transcoder::V1::JobTemplate. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new TranscoderService REST client object.
- (config) — Configure the TranscoderService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_job_templates
def list_job_templates(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse
def list_job_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse
Lists job templates in the specified region.
def list_job_templates(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse
list_job_templates
via a request object, either of type
ListJobTemplatesRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_job_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse
list_job_templates
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent location from which to retrieve the collection of job
templates. Format:
projects/{project}/locations/{location}
- page_size (::Integer) — The maximum number of items to return.
-
page_token (::String) — The
next_page_token
value returned from a previous List request, if any. - filter (::String) — The filter expression, following the syntax outlined in https://google.aip.dev/160.
- order_by (::String) — One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Video::Transcoder::V1::ListJobTemplatesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::ListJobTemplatesRequest.new # Call the list_job_templates method. result = client.list_job_templates request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Video::Transcoder::V1::JobTemplate. p item end
#list_jobs
def list_jobs(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse
def list_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse
Lists jobs in the specified region.
def list_jobs(request, options = nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse
list_jobs
via a request object, either of type
ListJobsRequest or an equivalent Hash.
- request (::Google::Cloud::Video::Transcoder::V1::ListJobsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Video::Transcoder::V1::ListJobsResponse
list_jobs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Format:
projects/{project}/locations/{location}
- page_size (::Integer) — The maximum number of items to return.
-
page_token (::String) — The
next_page_token
value returned from a previous List request, if any. - filter (::String) — The filter expression, following the syntax outlined in https://google.aip.dev/160.
- order_by (::String) — One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Video::Transcoder::V1::ListJobsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/video/transcoder/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Video::Transcoder::V1::TranscoderService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Video::Transcoder::V1::ListJobsRequest.new # Call the list_jobs method. result = client.list_jobs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Video::Transcoder::V1::Job. p item end