Module: Google::Cloud::StorageBatchOperations::V1::StorageBatchOperations::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/paths.rb
Overview
Path helper methods for the StorageBatchOperations API.
Instance Method Summary collapse
-
#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
-
#job_path(project:, location:, job:) ⇒ ::String
Create a fully-qualified Job resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
Instance Method Details
#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
40 41 42 43 44 45 46 |
# File 'lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/paths.rb', line 40 def crypto_key_path project:, location:, key_ring:, crypto_key: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" end |
#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}
60 61 62 63 64 65 |
# File 'lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/paths.rb', line 60 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 |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
78 79 80 81 82 |
# File 'lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/paths.rb', line 78 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |