Module: Google::Cloud::Dialogflow::CX::V3::Sessions::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb
Overview
Path helper methods for the Sessions API.
Instance Method Summary collapse
-
#data_store_path(**args) ⇒ ::String
Create a fully-qualified DataStore resource string.
-
#entity_type_path(project:, location:, agent:, entity_type:) ⇒ ::String
Create a fully-qualified EntityType resource string.
-
#intent_path(project:, location:, agent:, intent:) ⇒ ::String
Create a fully-qualified Intent resource string.
-
#page_path(project:, location:, agent:, flow:, page:) ⇒ ::String
Create a fully-qualified Page resource string.
-
#session_entity_type_path(**args) ⇒ ::String
Create a fully-qualified SessionEntityType resource string.
-
#session_path(**args) ⇒ ::String
Create a fully-qualified Session resource string.
-
#version_path(project:, location:, agent:, flow:, version:) ⇒ ::String
Create a fully-qualified Version resource string.
Instance Method Details
#data_store_path(project: , location: , data_store: ) ⇒ ::String #data_store_path(project: , location: , collection: , data_store: ) ⇒ ::String
Create a fully-qualified DataStore resource string.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 51 def data_store_path **args resources = { "data_store:location:project" => (proc do |project:, location:, data_store:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}" end), "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:| 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}/dataStores/#{data_store}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#entity_type_path(project:, location:, agent:, entity_type:) ⇒ ::String
Create a fully-qualified EntityType resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}
86 87 88 89 90 91 92 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 86 def entity_type_path project:, location:, agent:, entity_type: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/entityTypes/#{entity_type}" end |
#intent_path(project:, location:, agent:, intent:) ⇒ ::String
Create a fully-qualified Intent resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/intents/{intent}
107 108 109 110 111 112 113 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 107 def intent_path project:, location:, agent:, intent: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/intents/#{intent}" end |
#page_path(project:, location:, agent:, flow:, page:) ⇒ ::String
Create a fully-qualified Page resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}
129 130 131 132 133 134 135 136 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 129 def page_path project:, location:, agent:, flow:, page: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" raise ::ArgumentError, "flow cannot contain /" if flow.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/pages/#{page}" end |
#session_entity_type_path(project: , location: , agent: , session: , entity_type: ) ⇒ ::String #session_entity_type_path(project: , location: , agent: , environment: , session: , entity_type: ) ⇒ ::String
Create a fully-qualified SessionEntityType resource string.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 214 def session_entity_type_path **args resources = { "agent:entity_type:location:project:session" => (proc do |project:, location:, agent:, session:, entity_type:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/sessions/#{session}/entityTypes/#{entity_type}" end), "agent:entity_type:environment:location:project:session" => (proc do |project:, location:, agent:, environment:, session:, entity_type:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/" raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/environments/#{environment}/sessions/#{session}/entityTypes/#{entity_type}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#session_path(project: , location: , agent: , session: ) ⇒ ::String #session_path(project: , location: , agent: , environment: , session: ) ⇒ ::String
Create a fully-qualified Session resource string.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 163 def session_path **args resources = { "agent:location:project:session" => (proc do |project:, location:, agent:, session:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/sessions/#{session}" end), "agent:environment:location:project:session" => (proc do |project:, location:, agent:, environment:, session:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/environments/#{environment}/sessions/#{session}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#version_path(project:, location:, agent:, flow:, version:) ⇒ ::String
Create a fully-qualified Version resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}
254 255 256 257 258 259 260 261 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 254 def version_path project:, location:, agent:, flow:, version: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/" raise ::ArgumentError, "flow cannot contain /" if flow.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/versions/#{version}" end |