module Google::Cloud::Tasks::V2::CloudTasks::Paths
Path helper methods for the CloudTasks
API.
Public Instance Methods
Create a fully-qualified Location resource string.
The resource will be in the following format:
`projects/{project}/locations/{location}`
@param project [String] @param location [String]
@return [::String]
# File lib/google/cloud/tasks/v2/cloud_tasks/paths.rb, line 38 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end
Create a fully-qualified Queue
resource string.
The resource will be in the following format:
`projects/{project}/locations/{location}/queues/{queue}`
@param project [String] @param location [String] @param queue [String]
@return [::String]
# File lib/google/cloud/tasks/v2/cloud_tasks/paths.rb, line 56 def queue_path project:, location:, queue: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/queues/#{queue}" end
Create a fully-qualified Task
resource string.
The resource will be in the following format:
`projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`
@param project [String] @param location [String] @param queue [String] @param task [String]
@return [::String]
# File lib/google/cloud/tasks/v2/cloud_tasks/paths.rb, line 76 def task_path project:, location:, queue:, task: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" end