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

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}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • secret (String)
  • version (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • location (String)
  • namespace (String)
  • service (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • location (String)
  • agent (String)
  • tool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • location (String)
  • agent (String)
  • tool (String)
  • version (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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