Module: Google::Cloud::Ces::V1beta::AgentService::Paths

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

Overview

Path helper methods for the AgentService 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/v1beta/agent_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

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


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

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

#app_version_path(project:, location:, app:, version:) ⇒ ::String

Create a fully-qualified AppVersion resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def app_version_path project:, location:, app:, version:
  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}/versions/#{version}"
end

#changelog_path(project:, location:, app:, changelog:) ⇒ ::String

Create a fully-qualified Changelog resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


101
102
103
104
105
106
107
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 101

def changelog_path project:, location:, app:, changelog:
  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}/changelogs/#{changelog}"
end

#conversation_path(project:, location:, app:, conversation:) ⇒ ::String

Create a fully-qualified Conversation resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


122
123
124
125
126
127
128
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 122

def conversation_path project:, location:, app:, conversation:
  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}/conversations/#{conversation}"
end

#dataset_path(project:, location:, dataset:) ⇒ ::String

Create a fully-qualified Dataset resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


142
143
144
145
146
147
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 142

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

  "projects/#{project}/locations/#{location}/datasets/#{dataset}"
end

#deidentify_template_path(organization:, location:, deidentify_template:) ⇒ ::String #deidentify_template_path(project:, location:, deidentify_template:) ⇒ ::String

Create a fully-qualified DeidentifyTemplate resource string.

Overloads:

  • #deidentify_template_path(organization:, location:, deidentify_template:) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}

    Parameters:

    • organization (String)
    • location (String)
    • deidentify_template (String)
  • #deidentify_template_path(project:, location:, deidentify_template:) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}

    Parameters:

    • project (String)
    • location (String)
    • deidentify_template (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 171

def deidentify_template_path **args
  resources = {
    "deidentify_template:location:organization" => (proc do |organization:, location:, deidentify_template:|
      raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

      "organizations/#{organization}/locations/#{location}/deidentifyTemplates/#{deidentify_template}"
    end),
    "deidentify_template:location:project" => (proc do |project:, location:, deidentify_template:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

      "projects/#{project}/locations/#{location}/deidentifyTemplates/#{deidentify_template}"
    end)
  }

  resource = resources[args.keys.sort.join(":")]
  raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
  resource.call(**args)
end

#deployment_path(project:, location:, app:, deployment:) ⇒ ::String

Create a fully-qualified Deployment resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


205
206
207
208
209
210
211
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 205

def deployment_path project:, location:, app:, deployment:
  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}/deployments/#{deployment}"
end

#dialogflow_agent_path(project:, location:, agent:) ⇒ ::String

Create a fully-qualified DialogflowAgent 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)


225
226
227
228
229
230
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 225

def dialogflow_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

#engine_path(project:, location:, collection:, engine:) ⇒ ::String

Create a fully-qualified Engine resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/collections/{collection}/engines/{engine}

Parameters:

  • project (String)
  • location (String)
  • collection (String)
  • engine (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


245
246
247
248
249
250
251
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 245

def engine_path project:, location:, collection:, engine:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"

  "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}"
end

#evaluation_run_path(project:, location:, app:, evaluation_run:) ⇒ ::String

Create a fully-qualified EvaluationRun resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


266
267
268
269
270
271
272
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 266

def evaluation_run_path project:, location:, app:, evaluation_run:
  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}/evaluationRuns/#{evaluation_run}"
end

#example_path(project:, location:, app:, example:) ⇒ ::String

Create a fully-qualified Example resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


287
288
289
290
291
292
293
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 287

def example_path project:, location:, app:, example:
  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}/examples/#{example}"
end

#guardrail_path(project:, location:, app:, guardrail:) ⇒ ::String

Create a fully-qualified Guardrail resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


308
309
310
311
312
313
314
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 308

def guardrail_path project:, location:, app:, guardrail:
  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}/guardrails/#{guardrail}"
end

#inspect_template_path(organization:, location:, inspect_template:) ⇒ ::String #inspect_template_path(project:, location:, inspect_template:) ⇒ ::String

Create a fully-qualified InspectTemplate resource string.

Overloads:

  • #inspect_template_path(organization:, location:, inspect_template:) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}

    Parameters:

    • organization (String)
    • location (String)
    • inspect_template (String)
  • #inspect_template_path(project:, location:, inspect_template:) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/inspectTemplates/{inspect_template}

    Parameters:

    • project (String)
    • location (String)
    • inspect_template (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 338

def inspect_template_path **args
  resources = {
    "inspect_template:location:organization" => (proc do |organization:, location:, inspect_template:|
      raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

      "organizations/#{organization}/locations/#{location}/inspectTemplates/#{inspect_template}"
    end),
    "inspect_template:location:project" => (proc do |project:, location:, inspect_template:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

      "projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}"
    end)
  }

  resource = resources[args.keys.sort.join(":")]
  raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
  resource.call(**args)
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


370
371
372
373
374
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 370

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

  "projects/#{project}/locations/#{location}"
end

#secret_version_path(project:, secret:, secret_version:) ⇒ ::String

Create a fully-qualified SecretVersion resource string.

The resource will be in the following format:

projects/{project}/secrets/{secret}/versions/{secret_version}

Parameters:

  • project (String)
  • secret (String)
  • secret_version (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


388
389
390
391
392
393
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 388

def secret_version_path project:, secret:, 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/#{secret_version}"
end

#security_settings_path(project:, location:) ⇒ ::String

Create a fully-qualified SecuritySettings resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/securitySettings

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


406
407
408
409
410
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 406

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

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


425
426
427
428
429
430
431
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 425

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:, 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)


446
447
448
449
450
451
452
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 446

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)


467
468
469
470
471
472
473
# File 'lib/google/cloud/ces/v1beta/agent_service/paths.rb', line 467

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