Module: Google::Cloud::Build::V2::RepositoryManager::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/build/v2/repository_manager/paths.rb
Overview
Path helper methods for the RepositoryManager API.
Instance Method Summary collapse
-
#connection_path(project:, location:, connection:) ⇒ ::String
Create a fully-qualified Connection resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#repository_path(project:, location:, connection:, repository:) ⇒ ::String
Create a fully-qualified Repository resource string.
-
#secret_version_path(project:, secret:, version:) ⇒ ::String
Create a fully-qualified SecretVersion resource string.
-
#service_path(project:, location:, namespace:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
Instance Method Details
#connection_path(project:, location:, connection:) ⇒ ::String
Create a fully-qualified Connection resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/connections/{connection}
39 40 41 42 43 44 |
# File 'lib/google/cloud/build/v2/repository_manager/paths.rb', line 39 def connection_path project:, location:, connection: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/connections/#{connection}" 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}
57 58 59 60 61 |
# File 'lib/google/cloud/build/v2/repository_manager/paths.rb', line 57 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#repository_path(project:, location:, connection:, repository:) ⇒ ::String
Create a fully-qualified Repository resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}
76 77 78 79 80 81 82 |
# File 'lib/google/cloud/build/v2/repository_manager/paths.rb', line 76 def repository_path project:, location:, connection:, repository: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}" end |
#secret_version_path(project:, secret:, version:) ⇒ ::String
Create a fully-qualified SecretVersion resource string.
The resource will be in the following format:
projects/{project}/secrets/{secret}/versions/{version}
96 97 98 99 100 101 |
# File 'lib/google/cloud/build/v2/repository_manager/paths.rb', line 96 def secret_version_path project:, secret:, version: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" "projects/#{project}/secrets/#{secret}/versions/#{version}" end |
#service_path(project:, location:, namespace:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}
116 117 118 119 120 121 122 |
# File 'lib/google/cloud/build/v2/repository_manager/paths.rb', line 116 def service_path project:, location:, namespace:, service: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" end |