Module: Google::Cloud::Tasks::V2beta3::CloudTasks::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb
Overview
Path helper methods for the CloudTasks API.
Instance Method Summary collapse
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#queue_path(project:, location:, queue:) ⇒ ::String
Create a fully-qualified Queue resource string.
-
#task_path(project:, location:, queue:, task:) ⇒ ::String
Create a fully-qualified Task resource string.
Instance Method Details
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
38 39 40 41 42 |
# File 'lib/google/cloud/tasks/v2beta3/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 |
#queue_path(project:, location:, queue:) ⇒ ::String
Create a fully-qualified Queue resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/queues/{queue}
56 57 58 59 60 61 |
# File 'lib/google/cloud/tasks/v2beta3/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 |
#task_path(project:, location:, queue:, task:) ⇒ ::String
Create a fully-qualified Task resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/queues/{queue}/tasks/{task}
76 77 78 79 80 81 82 |
# File 'lib/google/cloud/tasks/v2beta3/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 |