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.
-
#playbook_path(project:, location:, agent:, playbook:) ⇒ ::String
Create a fully-qualified Playbook 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.
-
#tool_path(project:, location:, agent:, tool:) ⇒ ::String
Create a fully-qualified Tool 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 |
#playbook_path(project:, location:, agent:, playbook:) ⇒ ::String
Create a fully-qualified Playbook resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}
151 152 153 154 155 156 157 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 151 def playbook_path project:, location:, agent:, playbook: 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}/playbooks/#{playbook}" 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.
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 235 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.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 184 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 |
#tool_path(project:, location:, agent:, tool:) ⇒ ::String
Create a fully-qualified Tool resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/tools/{tool}
274 275 276 277 278 279 280 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 274 def tool_path project:, location:, agent:, tool: 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}/tools/#{tool}" 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}
296 297 298 299 300 301 302 303 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 296 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 |