Module: Google::Cloud::Dialogflow::V2::Intents::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/dialogflow/v2/intents/paths.rb
Overview
Path helper methods for the Intents API.
Instance Method Summary collapse
-
#agent_path(project:) ⇒ String
Create a fully-qualified Agent resource string.
-
#context_path(project:, session:, context:) ⇒ String
Create a fully-qualified Context resource string.
-
#intent_path(project:, intent:) ⇒ String
Create a fully-qualified Intent resource string.
Instance Method Details
#agent_path(project:) ⇒ String
Create a fully-qualified Agent resource string.
The resource will be in the following format:
projects/{project}/agent
37 38 39 |
# File 'lib/google/cloud/dialogflow/v2/intents/paths.rb', line 37 def agent_path project: "projects/#{project}/agent" end |
#context_path(project:, session:, context:) ⇒ String
Create a fully-qualified Context resource string.
The resource will be in the following format:
projects/{project}/agent/sessions/{session}/contexts/{context}
53 54 55 56 57 58 |
# File 'lib/google/cloud/dialogflow/v2/intents/paths.rb', line 53 def context_path project:, session:, context: raise ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/agent/sessions/#{session}/contexts/#{context}" end |
#intent_path(project:, intent:) ⇒ String
Create a fully-qualified Intent resource string.
The resource will be in the following format:
projects/{project}/agent/intents/{intent}
71 72 73 74 75 |
# File 'lib/google/cloud/dialogflow/v2/intents/paths.rb', line 71 def intent_path project:, intent: raise ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/agent/intents/#{intent}" end |