Module: Google::Cloud::Ces::V1::SessionService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/ces/v1/session_service/paths.rb
Overview
Path helper methods for the SessionService API.
Instance Method Summary collapse
-
#agent_path(project:, location:, app:, agent:) ⇒ ::String
Create a fully-qualified Agent resource string.
-
#session_path(project:, location:, app:, session:) ⇒ ::String
Create a fully-qualified Session resource string.
-
#tool_path(project:, location:, app:, tool:) ⇒ ::String
Create a fully-qualified Tool resource string.
-
#toolset_path(project:, location:, app:, toolset:) ⇒ ::String
Create a fully-qualified Toolset resource string.
Instance Method Details
#agent_path(project:, location:, app:, agent:) ⇒ ::String
Create a fully-qualified Agent resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/apps/{app}/agents/{agent}
40 41 42 43 44 45 46 |
# File 'lib/google/cloud/ces/v1/session_service/paths.rb', line 40 def agent_path project:, location:, app:, agent: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" "projects/#{project}/locations/#{location}/apps/#{app}/agents/#{agent}" end |
#session_path(project:, location:, app:, session:) ⇒ ::String
Create a fully-qualified Session resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/apps/{app}/sessions/{session}
61 62 63 64 65 66 67 |
# File 'lib/google/cloud/ces/v1/session_service/paths.rb', line 61 def session_path project:, location:, app:, session: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" "projects/#{project}/locations/#{location}/apps/#{app}/sessions/#{session}" end |
#tool_path(project:, location:, app:, tool:) ⇒ ::String
Create a fully-qualified Tool resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/apps/{app}/tools/{tool}
82 83 84 85 86 87 88 |
# File 'lib/google/cloud/ces/v1/session_service/paths.rb', line 82 def tool_path project:, location:, app:, tool: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" "projects/#{project}/locations/#{location}/apps/#{app}/tools/#{tool}" end |
#toolset_path(project:, location:, app:, toolset:) ⇒ ::String
Create a fully-qualified Toolset resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}
103 104 105 106 107 108 109 |
# File 'lib/google/cloud/ces/v1/session_service/paths.rb', line 103 def toolset_path project:, location:, app:, toolset: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" "projects/#{project}/locations/#{location}/apps/#{app}/toolsets/#{toolset}" end |