Module: Google::Cloud::Dialogflow::CX::V3::Environments::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/dialogflow/cx/v3/environments/paths.rb

Overview

Path helper methods for the Environments 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/environments/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

#environment_path(project:, location:, agent:, environment:) ⇒ ::String

Create a fully-qualified Environment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/agents/{agent}/environments/{environment}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
66
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 60

def environment_path project:, location:, agent:, environment:
  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}/environments/#{environment}"
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)


80
81
82
83
84
85
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 80

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)


100
101
102
103
104
105
106
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 100

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

#test_case_path(project:, location:, agent:, test_case:) ⇒ ::String

Create a fully-qualified TestCase resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


121
122
123
124
125
126
127
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 121

def test_case_path project:, location:, agent:, test_case:
  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}/testCases/#{test_case}"
end

#version_path(project:, location:, agent:, flow:, version:) ⇒ ::String

Create a fully-qualified Version resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


143
144
145
146
147
148
149
150
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 143

def version_path project:, location:, agent:, flow:, 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, "flow cannot contain /" if flow.to_s.include? "/"

  "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/versions/#{version}"
end

#webhook_path(project:, location:, agent:, webhook:) ⇒ ::String

Create a fully-qualified Webhook resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


165
166
167
168
169
170
171
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 165

def webhook_path project:, location:, agent:, webhook:
  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}/webhooks/#{webhook}"
end