Module: Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/service_directory/v1beta1/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.
-
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network 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/v1beta1/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/v1beta1/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/v1beta1/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 |
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network resource string.
The resource will be in the following format:
projects/{project}/locations/global/networks/{network}
97 98 99 100 101 |
# File 'lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb', line 97 def network_path project:, network: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/global/networks/#{network}" 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/service_directory/v1beta1/registration_service/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 |