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

#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)


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

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)


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

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)


124
125
126
127
128
129
130
131
# File 'lib/google/cloud/dialogflow/cx/v3/environments/paths.rb', line 124

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)


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

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