Module: Google::Cloud::Video::Transcoder::V1beta1::TranscoderService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/video/transcoder/v1beta1/transcoder_service/paths.rb

Overview

Path helper methods for the TranscoderService API.

Instance Method Summary collapse

Instance Method Details

#job_path(project:, location:, job:) ⇒ ::String

Create a fully-qualified Job resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/jobs/{job}

Parameters:

  • project (String)
  • location (String)
  • job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
# File 'lib/google/cloud/video/transcoder/v1beta1/transcoder_service/paths.rb', line 40

def job_path project:, location:, job:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/jobs/#{job}"
end

#job_template_path(project:, location:, job_template:) ⇒ ::String

Create a fully-qualified JobTemplate resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/jobTemplates/{job_template}

Parameters:

  • project (String)
  • location (String)
  • job_template (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
# File 'lib/google/cloud/video/transcoder/v1beta1/transcoder_service/paths.rb', line 59

def job_template_path project:, location:, job_template:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/jobTemplates/#{job_template}"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


77
78
79
80
81
# File 'lib/google/cloud/video/transcoder/v1beta1/transcoder_service/paths.rb', line 77

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end