Module: Google::Cloud::ServiceDirectory::V1::RegistrationService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/service_directory/v1/registration_service/paths.rb
Overview
Path helper methods for the RegistrationService API.
Instance Method Summary collapse
-
#endpoint_path(project:, location:, namespace:, service:, endpoint:) ⇒ ::String
Create a fully-qualified Endpoint resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#namespace_path(project:, location:, namespace:) ⇒ ::String
Create a fully-qualified Namespace resource string.
-
#service_path(project:, location:, namespace:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
Instance Method Details
#endpoint_path(project:, location:, namespace:, service:, endpoint:) ⇒ ::String
Create a fully-qualified Endpoint resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}
41 42 43 44 45 46 47 48 |
# File 'lib/google/cloud/service_directory/v1/registration_service/paths.rb', line 41 def endpoint_path project:, location:, namespace:, service:, endpoint: 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? "/" raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}/endpoints/#{endpoint}" 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}
61 62 63 64 65 |
# File 'lib/google/cloud/service_directory/v1/registration_service/paths.rb', line 61 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#namespace_path(project:, location:, namespace:) ⇒ ::String
Create a fully-qualified Namespace resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/namespaces/{namespace}
79 80 81 82 83 84 |
# File 'lib/google/cloud/service_directory/v1/registration_service/paths.rb', line 79 def namespace_path project:, location:, namespace: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/namespaces/#{namespace}" 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}
99 100 101 102 103 104 105 |
# File 'lib/google/cloud/service_directory/v1/registration_service/paths.rb', line 99 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 |