Module: Google::Cloud::Dlp::V2::DlpService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/dlp/v2/dlp_service/paths.rb

Overview

Path helper methods for the DlpService API.

Instance Method Summary collapse

Instance Method Details

#column_data_profile_path(organization: , location: , column_data_profile: ) ⇒ ::String #column_data_profile_path(project: , location: , column_data_profile: ) ⇒ ::String

Create a fully-qualified ColumnDataProfile resource string.

Overloads:

  • #column_data_profile_path(organization: , location: , column_data_profile: ) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}

    Parameters:

    • organization (String) (defaults to: )
    • location (String) (defaults to: )
    • column_data_profile (String) (defaults to: )
  • #column_data_profile_path(project: , location: , column_data_profile: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • column_data_profile (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 49

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

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

      "projects/#{project}/locations/#{location}/columnDataProfiles/#{column_data_profile}"
    end)
  }

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

#connection_path(project:, location:, connection:) ⇒ ::String

Create a fully-qualified Connection resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/connections/{connection}

Parameters:

  • project (String)
  • location (String)
  • connection (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


82
83
84
85
86
87
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 82

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

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

#deidentify_template_path(organization: , deidentify_template: ) ⇒ ::String #deidentify_template_path(project: , deidentify_template: ) ⇒ ::String #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: , deidentify_template: ) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/deidentifyTemplates/{deidentify_template}

    Parameters:

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

    The resource will be in the following format:

    projects/{project}/deidentifyTemplates/{deidentify_template}

    Parameters:

    • project (String) (defaults to: )
    • deidentify_template (String) (defaults to: )
  • #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) (defaults to: )
    • location (String) (defaults to: )
    • deidentify_template (String) (defaults to: )
  • #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) (defaults to: )
    • location (String) (defaults to: )
    • deidentify_template (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 127

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

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

      "projects/#{project}/deidentifyTemplates/#{deidentify_template}"
    end),
    "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

#discovery_config_path(project:, location:, discovery_config:) ⇒ ::String

Create a fully-qualified DiscoveryConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}

Parameters:

  • project (String)
  • location (String)
  • discovery_config (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


170
171
172
173
174
175
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 170

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

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

#dlp_job_path(project: , dlp_job: ) ⇒ ::String #dlp_job_path(project: , location: , dlp_job: ) ⇒ ::String

Create a fully-qualified DlpJob resource string.

Overloads:

  • #dlp_job_path(project: , dlp_job: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/dlpJobs/{dlp_job}

    Parameters:

    • project (String) (defaults to: )
    • dlp_job (String) (defaults to: )
  • #dlp_job_path(project: , location: , dlp_job: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/dlpJobs/{dlp_job}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • dlp_job (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 198

def dlp_job_path **args
  resources = {
    "dlp_job:project" => (proc do |project:, dlp_job:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

      "projects/#{project}/dlpJobs/#{dlp_job}"
    end),
    "dlp_job:location:project" => (proc do |project:, location:, dlp_job:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

      "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}"
    end)
  }

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

#inspect_template_path(organization: , inspect_template: ) ⇒ ::String #inspect_template_path(project: , inspect_template: ) ⇒ ::String #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: , inspect_template: ) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/inspectTemplates/{inspect_template}

    Parameters:

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

    The resource will be in the following format:

    projects/{project}/inspectTemplates/{inspect_template}

    Parameters:

    • project (String) (defaults to: )
    • inspect_template (String) (defaults to: )
  • #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) (defaults to: )
    • location (String) (defaults to: )
    • inspect_template (String) (defaults to: )
  • #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) (defaults to: )
    • location (String) (defaults to: )
    • inspect_template (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 256

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

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

      "projects/#{project}/inspectTemplates/#{inspect_template}"
    end),
    "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

#job_trigger_path(project: , job_trigger: ) ⇒ ::String #job_trigger_path(project: , location: , job_trigger: ) ⇒ ::String

Create a fully-qualified JobTrigger resource string.

Overloads:

  • #job_trigger_path(project: , job_trigger: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/jobTriggers/{job_trigger}

    Parameters:

    • project (String) (defaults to: )
    • job_trigger (String) (defaults to: )
  • #job_trigger_path(project: , location: , job_trigger: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/jobTriggers/{job_trigger}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • job_trigger (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 308

def job_trigger_path **args
  resources = {
    "job_trigger:project" => (proc do |project:, job_trigger:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

      "projects/#{project}/jobTriggers/#{job_trigger}"
    end),
    "job_trigger:location:project" => (proc do |project:, location:, job_trigger:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

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


339
340
341
342
343
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 339

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

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

#organization_location_path(organization:, location:) ⇒ ::String

Create a fully-qualified OrganizationLocation resource string.

The resource will be in the following format:

organizations/{organization}/locations/{location}

Parameters:

  • organization (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


370
371
372
373
374
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 370

def organization_location_path organization:, location:
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"

  "organizations/#{organization}/locations/#{location}"
end

#organization_path(organization:) ⇒ ::String

Create a fully-qualified Organization resource string.

The resource will be in the following format:

organizations/{organization}

Parameters:

  • organization (String)

Returns:

  • (::String)


355
356
357
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 355

def organization_path organization:
  "organizations/#{organization}"
end

#project_data_profile_path(organization: , location: , project_data_profile: ) ⇒ ::String #project_data_profile_path(project: , location: , project_data_profile: ) ⇒ ::String

Create a fully-qualified ProjectDataProfile resource string.

Overloads:

  • #project_data_profile_path(organization: , location: , project_data_profile: ) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}

    Parameters:

    • organization (String) (defaults to: )
    • location (String) (defaults to: )
    • project_data_profile (String) (defaults to: )
  • #project_data_profile_path(project: , location: , project_data_profile: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • project_data_profile (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 412

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

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

      "projects/#{project}/locations/#{location}/projectDataProfiles/#{project_data_profile}"
    end)
  }

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

#project_path(project:) ⇒ ::String

Create a fully-qualified Project resource string.

The resource will be in the following format:

projects/{project}

Parameters:

  • project (String)

Returns:

  • (::String)


386
387
388
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 386

def project_path project:
  "projects/#{project}"
end

#stored_info_type_path(organization: , stored_info_type: ) ⇒ ::String #stored_info_type_path(project: , stored_info_type: ) ⇒ ::String #stored_info_type_path(organization: , location: , stored_info_type: ) ⇒ ::String #stored_info_type_path(project: , location: , stored_info_type: ) ⇒ ::String

Create a fully-qualified StoredInfoType resource string.

Overloads:

  • #stored_info_type_path(organization: , stored_info_type: ) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/storedInfoTypes/{stored_info_type}

    Parameters:

    • organization (String) (defaults to: )
    • stored_info_type (String) (defaults to: )
  • #stored_info_type_path(project: , stored_info_type: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/storedInfoTypes/{stored_info_type}

    Parameters:

    • project (String) (defaults to: )
    • stored_info_type (String) (defaults to: )
  • #stored_info_type_path(organization: , location: , stored_info_type: ) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}

    Parameters:

    • organization (String) (defaults to: )
    • location (String) (defaults to: )
    • stored_info_type (String) (defaults to: )
  • #stored_info_type_path(project: , location: , stored_info_type: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • stored_info_type (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 471

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

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

      "projects/#{project}/storedInfoTypes/#{stored_info_type}"
    end),
    "location:organization:stored_info_type" => (proc do |organization:, location:, stored_info_type:|
      raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

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

      "projects/#{project}/locations/#{location}/storedInfoTypes/#{stored_info_type}"
    end)
  }

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

#table_data_profile_path(organization: , location: , table_data_profile: ) ⇒ ::String #table_data_profile_path(project: , location: , table_data_profile: ) ⇒ ::String

Create a fully-qualified TableDataProfile resource string.

Overloads:

  • #table_data_profile_path(organization: , location: , table_data_profile: ) ⇒ ::String

    The resource will be in the following format:

    organizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}

    Parameters:

    • organization (String) (defaults to: )
    • location (String) (defaults to: )
    • table_data_profile (String) (defaults to: )
  • #table_data_profile_path(project: , location: , table_data_profile: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • table_data_profile (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 524

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

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

      "projects/#{project}/locations/#{location}/tableDataProfiles/#{table_data_profile}"
    end)
  }

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