Module: Google::Cloud::Dialogflow::V2::ConversationProfiles::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb
Overview
Path helper methods for the ConversationProfiles 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_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.
-
#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/conversation_profiles/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.
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/conversation_profiles/paths.rb', line 103 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_profile_path(project: , conversation_profile: ) ⇒ ::String #conversation_profile_path(project: , location: , conversation_profile: ) ⇒ ::String
Create a fully-qualified ConversationProfile 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/conversation_profiles/paths.rb', line 144 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/conversation_profiles/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.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb', line 187 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}
221 222 223 224 225 226 |
# File 'lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb', line 221 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.
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb', line 249 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}
280 281 282 283 284 |
# File 'lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb', line 280 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
296 297 298 |
# File 'lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb', line 296 def project_path project: "projects/#{project}" end |