Class: Google::Apis::TranscoderV1beta1::TranscoderService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/google/apis/transcoder_v1beta1/service.rb

Overview

Transcoder API

This API converts video files into formats suitable for consumer distribution.

Examples:

require 'google/apis/transcoder_v1beta1'

Transcoder = Google::Apis::TranscoderV1beta1 # Alias the module
service = Transcoder::TranscoderService.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTranscoderService

Returns a new instance of TranscoderService.



45
46
47
48
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 45

def initialize
  super('https://transcoder.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



43
44
45
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#create_project_location_job(parent, job_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::Job

Creates a job in the specified region.

Parameters:

  • parent (String)

    Required. The parent location to create and process this job. Format: projects/project/locations/location``

  • job_object (Google::Apis::TranscoderV1beta1::Job) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



210
211
212
213
214
215
216
217
218
219
220
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 210

def create_project_location_job(parent, job_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+parent}/jobs', options)
  command.request_representation = Google::Apis::TranscoderV1beta1::Job::Representation
  command.request_object = job_object
  command.response_representation = Google::Apis::TranscoderV1beta1::Job::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::Job
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_location_job_template(parent, job_template_object = nil, job_template_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::JobTemplate

Creates a job template in the specified region.

Parameters:

  • parent (String)

    Required. The parent location to create this job template. Format: projects/ project/locations/location``

  • job_template_object (Google::Apis::TranscoderV1beta1::JobTemplate) (defaults to: nil)
  • job_template_id (String) (defaults to: nil)

    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*.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



76
77
78
79
80
81
82
83
84
85
86
87
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 76

def create_project_location_job_template(parent, job_template_object = nil, job_template_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+parent}/jobTemplates', options)
  command.request_representation = Google::Apis::TranscoderV1beta1::JobTemplate::Representation
  command.request_object = job_template_object
  command.response_representation = Google::Apis::TranscoderV1beta1::JobTemplate::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::JobTemplate
  command.params['parent'] = parent unless parent.nil?
  command.query['jobTemplateId'] = job_template_id unless job_template_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_job(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::Empty

Deletes a job.

Parameters:

  • name (String)

    Required. The name of the job to delete. Format: projects/project/locations/ location/jobs/job``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



243
244
245
246
247
248
249
250
251
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 243

def delete_project_location_job(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::TranscoderV1beta1::Empty::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_job_template(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::Empty

Deletes a job template.

Parameters:

  • name (String)

    Required. The name of the job template to delete. projects/project/ locations/location/jobTemplates/job_template``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



110
111
112
113
114
115
116
117
118
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 110

def delete_project_location_job_template(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::TranscoderV1beta1::Empty::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_job(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::Job

Returns the job data.

Parameters:

  • name (String)

    Required. The name of the job to retrieve. Format: projects/project/ locations/location/jobs/job``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



274
275
276
277
278
279
280
281
282
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 274

def get_project_location_job(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::TranscoderV1beta1::Job::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::Job
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_job_template(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::JobTemplate

Returns the job template data.

Parameters:

  • name (String)

    Required. The name of the job template to retrieve. Format: projects/project /locations/location/jobTemplates/job_template``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



141
142
143
144
145
146
147
148
149
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 141

def get_project_location_job_template(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::TranscoderV1beta1::JobTemplate::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::JobTemplate
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_job_templates(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::ListJobTemplatesResponse

Lists job templates in the specified region.

Parameters:

  • parent (String)

    Required. The parent location from which to retrieve the collection of job templates. Format: projects/project/locations/location``

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of items to return.

  • page_token (String) (defaults to: nil)

    The next_page_token value returned from a previous List request, if any.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



176
177
178
179
180
181
182
183
184
185
186
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 176

def list_project_location_job_templates(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+parent}/jobTemplates', options)
  command.response_representation = Google::Apis::TranscoderV1beta1::ListJobTemplatesResponse::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::ListJobTemplatesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_jobs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TranscoderV1beta1::ListJobsResponse

Lists jobs in the specified region.

Parameters:

  • parent (String)

    Required. Format: projects/project/locations/location``

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of items to return.

  • page_token (String) (defaults to: nil)

    The next_page_token value returned from a previous List request, if any.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



308
309
310
311
312
313
314
315
316
317
318
# File 'generated/google/apis/transcoder_v1beta1/service.rb', line 308

def list_project_location_jobs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+parent}/jobs', options)
  command.response_representation = Google::Apis::TranscoderV1beta1::ListJobsResponse::Representation
  command.response_class = Google::Apis::TranscoderV1beta1::ListJobsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end