Module: Google::Cloud::Dialogflow::CX::V3::Tools::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/dialogflow/cx/v3/tools/paths.rb
Overview
Path helper methods for the Tools API.
Instance Method Summary collapse
-
#agent_path(project:, location:, agent:) ⇒ ::String
Create a fully-qualified Agent resource string.
-
#secret_version_path(project:, secret:, version:) ⇒ ::String
Create a fully-qualified SecretVersion resource string.
-
#service_path(project:, location:, namespace:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
-
#tool_path(project:, location:, agent:, tool:) ⇒ ::String
Create a fully-qualified Tool resource string.
-
#tool_version_path(project:, location:, agent:, tool:, version:) ⇒ ::String
Create a fully-qualified ToolVersion 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/tools/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 |
#secret_version_path(project:, secret:, version:) ⇒ ::String
Create a fully-qualified SecretVersion resource string.
The resource will be in the following format:
projects/{project}/secrets/{secret}/versions/{version}
59 60 61 62 63 64 |
# File 'lib/google/cloud/dialogflow/cx/v3/tools/paths.rb', line 59 def secret_version_path project:, secret:, version: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" "projects/#{project}/secrets/#{secret}/versions/#{version}" 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}
79 80 81 82 83 84 85 |
# File 'lib/google/cloud/dialogflow/cx/v3/tools/paths.rb', line 79 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 |
#tool_path(project:, location:, agent:, tool:) ⇒ ::String
Create a fully-qualified Tool resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/tools/{tool}
100 101 102 103 104 105 106 |
# File 'lib/google/cloud/dialogflow/cx/v3/tools/paths.rb', line 100 def tool_path project:, location:, agent:, tool: 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}/tools/#{tool}" end |
#tool_version_path(project:, location:, agent:, tool:, version:) ⇒ ::String
Create a fully-qualified ToolVersion resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}
122 123 124 125 126 127 128 129 |
# File 'lib/google/cloud/dialogflow/cx/v3/tools/paths.rb', line 122 def tool_version_path project:, location:, agent:, tool:, 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, "tool cannot contain /" if tool.to_s.include? "/" "projects/#{project}/locations/#{location}/agents/#{agent}/tools/#{tool}/versions/#{version}" end |