Module: Google::Cloud::DiscoveryEngine::V1beta::EngineService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb
Overview
Path helper methods for the EngineService API.
Instance Method Summary collapse
-
#collection_path(project:, location:, collection:) ⇒ ::String
Create a fully-qualified Collection resource string.
-
#engine_path(project:, location:, collection:, engine:) ⇒ ::String
Create a fully-qualified Engine resource string.
Instance Method Details
#collection_path(project:, location:, collection:) ⇒ ::String
Create a fully-qualified Collection resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/collections/{collection}
39 40 41 42 43 44 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 39 def collection_path project:, location:, collection: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}" end |
#engine_path(project:, location:, collection:, engine:) ⇒ ::String
Create a fully-qualified Engine resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}
59 60 61 62 63 64 65 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 59 def engine_path project:, location:, collection:, engine: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}" end |