Module: Google::Cloud::Dialogflow::CX::V3::Environments::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/dialogflow/cx/v3/environments/paths.rb
Overview
Path helper methods for the Environments API.
Instance Method Summary collapse
-
#agent_path(project:, location:, agent:) ⇒ ::String
Create a fully-qualified Agent resource string.
-
#environment_path(project:, location:, agent:, environment:) ⇒ ::String
Create a fully-qualified Environment resource string.
-
#service_path(project:, location:, namespace:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
-
#test_case_path(project:, location:, agent:, test_case:) ⇒ ::String
Create a fully-qualified TestCase resource string.
-
#version_path(project:, location:, agent:, flow:, version:) ⇒ ::String
Create a fully-qualified Version resource string.
-
#webhook_path(project:, location:, agent:, webhook:) ⇒ ::String
Create a fully-qualified Webhook resource string.
Instance Method Details
#agent_path(project:, location:, agent:) ⇒ ::String
Create a fully-qualified Agent resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}
40 41 42 43 44 45 |
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 40 def agent_path project:, location:, agent: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}" end |
#environment_path(project:, location:, agent:, environment:) ⇒ ::String
Create a fully-qualified Environment resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/environments/{environment}
60 61 62 63 64 65 66 |
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 60 def environment_path project:, location:, agent:, environment: 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}/environments/#{environment}" end |
#service_path(project:, location:, namespace:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}
81 82 83 84 85 86 87 |
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 81 def service_path project:, location:, namespace:, service: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" end |
#test_case_path(project:, location:, agent:, test_case:) ⇒ ::String
Create a fully-qualified TestCase resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}
102 103 104 105 106 107 108 |
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 102 def test_case_path project:, location:, agent:, test_case: 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}/testCases/#{test_case}" 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}
124 125 126 127 128 129 130 131 |
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 124 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 |
#webhook_path(project:, location:, agent:, webhook:) ⇒ ::String
Create a fully-qualified Webhook resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}
146 147 148 149 150 151 152 |
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 146 def webhook_path project:, location:, agent:, webhook: 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}/webhooks/#{webhook}" end |