Module: Google::Cloud::Ces::V1beta::ToolService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/ces/v1beta/tool_service/paths.rb

Overview

Path helper methods for the ToolService API.

Instance Method Summary collapse

Instance Method Details

#app_path(project:, location:, app:) ⇒ ::String

Create a fully-qualified App resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/apps/{app}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/ces/v1beta/tool_service/paths.rb', line 39

def app_path project:, location:, app:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/apps/#{app}"
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)


59
60
61
62
63
64
65
# File 'lib/google/cloud/ces/v1beta/tool_service/paths.rb', line 59

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)


80
81
82
83
84
85
86
# File 'lib/google/cloud/ces/v1beta/tool_service/paths.rb', line 80

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