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
-
#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
#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}
41 42 43 44 45 46 47 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 41 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}
62 63 64 65 66 67 68 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 62 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}
84 85 86 87 88 89 90 91 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 84 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.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 169 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.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 118 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}
209 210 211 212 213 214 215 216 |
# File 'lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb', line 209 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 |