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

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}

Parameters:

  • project (String)
  • location (String)
  • app (String)
  • agent (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • location (String)
  • app (String)
  • session (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • location (String)
  • app (String)
  • tool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • location (String)
  • app (String)
  • toolset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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