Module: Google::Cloud::Dialogflow::V2::Conversations::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/dialogflow/v2/conversations/paths.rb
Overview
Path helper methods for the Conversations API.
Instance Method Summary collapse
-
#agent_path(**args) ⇒ ::String
Create a fully-qualified Agent resource string.
-
#conversation_model_path(**args) ⇒ ::String
Create a fully-qualified ConversationModel resource string.
-
#conversation_path(**args) ⇒ ::String
Create a fully-qualified Conversation resource string.
-
#conversation_profile_path(**args) ⇒ ::String
Create a fully-qualified ConversationProfile resource string.
-
#cx_security_settings_path(project:, location:, security_settings:) ⇒ ::String
Create a fully-qualified CXSecuritySettings resource string.
-
#document_path(**args) ⇒ ::String
Create a fully-qualified Document resource string.
-
#generator_path(project:, location:, generator:) ⇒ ::String
Create a fully-qualified Generator resource string.
-
#knowledge_base_path(**args) ⇒ ::String
Create a fully-qualified KnowledgeBase resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#message_path(**args) ⇒ ::String
Create a fully-qualified Message resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
Instance Method Details
#agent_path(project: ) ⇒ ::String #agent_path(project: , location: ) ⇒ ::String
Create a fully-qualified Agent resource string.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 46 def agent_path **args resources = { "project" => (proc do |project:| "projects/#{project}/agent" end), "location:project" => (proc do |project:, location:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}/agent" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#conversation_model_path(project: , location: , conversation_model: ) ⇒ ::String #conversation_model_path(project: , conversation_model: ) ⇒ ::String
Create a fully-qualified ConversationModel resource string.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 144 def conversation_model_path **args resources = { "conversation_model:location:project" => (proc do |project:, location:, conversation_model:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/conversationModels/#{conversation_model}" end), "conversation_model:project" => (proc do |project:, conversation_model:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/conversationModels/#{conversation_model}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#conversation_path(project: , conversation: ) ⇒ ::String #conversation_path(project: , location: , conversation: ) ⇒ ::String
Create a fully-qualified Conversation resource string.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 103 def conversation_path **args resources = { "conversation:project" => (proc do |project:, conversation:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/conversations/#{conversation}" end), "conversation:location:project" => (proc do |project:, location:, conversation:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/conversations/#{conversation}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#conversation_profile_path(project: , conversation_profile: ) ⇒ ::String #conversation_profile_path(project: , location: , conversation_profile: ) ⇒ ::String
Create a fully-qualified ConversationProfile resource string.
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 185 def conversation_profile_path **args resources = { "conversation_profile:project" => (proc do |project:, conversation_profile:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/conversationProfiles/#{conversation_profile}" end), "conversation_profile:location:project" => (proc do |project:, location:, conversation_profile:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/conversationProfiles/#{conversation_profile}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#cx_security_settings_path(project:, location:, security_settings:) ⇒ ::String
Create a fully-qualified CXSecuritySettings resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/securitySettings/{security_settings}
75 76 77 78 79 80 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 75 def cx_security_settings_path project:, location:, security_settings: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/securitySettings/#{security_settings}" end |
#document_path(project: , knowledge_base: , document: ) ⇒ ::String #document_path(project: , location: , knowledge_base: , document: ) ⇒ ::String
Create a fully-qualified Document resource string.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 228 def document_path **args resources = { "document:knowledge_base:project" => (proc do |project:, knowledge_base:, document:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "knowledge_base cannot contain /" if knowledge_base.to_s.include? "/" "projects/#{project}/knowledgeBases/#{knowledge_base}/documents/#{document}" end), "document:knowledge_base:location:project" => (proc do |project:, location:, knowledge_base:, document:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "knowledge_base cannot contain /" if knowledge_base.to_s.include? "/" "projects/#{project}/locations/#{location}/knowledgeBases/#{knowledge_base}/documents/#{document}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#generator_path(project:, location:, generator:) ⇒ ::String
Create a fully-qualified Generator resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/generators/{generator}
262 263 264 265 266 267 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 262 def generator_path project:, location:, generator: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/generators/#{generator}" end |
#knowledge_base_path(project: , knowledge_base: ) ⇒ ::String #knowledge_base_path(project: , location: , knowledge_base: ) ⇒ ::String
Create a fully-qualified KnowledgeBase resource string.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 290 def knowledge_base_path **args resources = { "knowledge_base:project" => (proc do |project:, knowledge_base:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/knowledgeBases/#{knowledge_base}" end), "knowledge_base:location:project" => (proc do |project:, location:, knowledge_base:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/knowledgeBases/#{knowledge_base}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
321 322 323 324 325 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 321 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#message_path(project: , conversation: , message: ) ⇒ ::String #message_path(project: , location: , conversation: , message: ) ⇒ ::String
Create a fully-qualified Message resource string.
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 350 def **args resources = { "conversation:message:project" => (proc do |project:, conversation:, message:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/" "projects/#{project}/conversations/#{conversation}/messages/#{}" end), "conversation:location:message:project" => (proc do |project:, location:, conversation:, message:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/" "projects/#{project}/locations/#{location}/conversations/#{conversation}/messages/#{}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
382 383 384 |
# File 'lib/google/cloud/dialogflow/v2/conversations/paths.rb', line 382 def project_path project: "projects/#{project}" end |