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
-
#agent_gateway_path(project:, location:, agent_gateway:) ⇒ ::String
Create a fully-qualified AgentGateway resource string.
-
#cmek_config_path(**args) ⇒ ::String
Create a fully-qualified CmekConfig resource string.
-
#collection_path(project:, location:, collection:) ⇒ ::String
Create a fully-qualified Collection resource string.
-
#crypto_key_versions_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String
Create a fully-qualified CryptoKeyVersions resource string.
-
#crypto_keys_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKeys resource string.
-
#engine_path(project:, location:, collection:, engine:) ⇒ ::String
Create a fully-qualified Engine resource string.
Instance Method Details
#agent_gateway_path(project:, location:, agent_gateway:) ⇒ ::String
Create a fully-qualified AgentGateway resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agentGateways/{agent_gateway}
39 40 41 42 43 44 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 39 def agent_gateway_path project:, location:, agent_gateway: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/agentGateways/#{agent_gateway}" end |
#cmek_config_path(project:, location:) ⇒ ::String #cmek_config_path(project:, location:, cmek_config:) ⇒ ::String
Create a fully-qualified CmekConfig resource string.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 67 def cmek_config_path **args resources = { "location:project" => (proc do |project:, location:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}/cmekConfig" end), "cmek_config:location:project" => (proc do |project:, location:, cmek_config:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/cmekConfigs/#{cmek_config}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#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}
99 100 101 102 103 104 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 99 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 |
#crypto_key_versions_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String
Create a fully-qualified CryptoKeyVersions resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
120 121 122 123 124 125 126 127 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 120 def crypto_key_versions_path project:, location:, key_ring:, crypto_key:, crypto_key_version: 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? "/" raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" end |
#crypto_keys_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKeys resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
142 143 144 145 146 147 148 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 142 def crypto_keys_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 |
#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}
163 164 165 166 167 168 169 |
# File 'lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb', line 163 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 |