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
-
#deidentify_template_path(**args) ⇒ ::String
Create a fully-qualified DeidentifyTemplate resource string.
-
#discovery_config_path(project:, location:, discovery_config:) ⇒ ::String
Create a fully-qualified DiscoveryConfig resource string.
-
#dlp_job_path(**args) ⇒ ::String
Create a fully-qualified DlpJob resource string.
-
#inspect_template_path(**args) ⇒ ::String
Create a fully-qualified InspectTemplate resource string.
-
#job_trigger_path(**args) ⇒ ::String
Create a fully-qualified JobTrigger resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
-
#organization_path(organization:) ⇒ ::String
Create a fully-qualified Organization resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
-
#stored_info_type_path(**args) ⇒ ::String
Create a fully-qualified StoredInfoType resource string.
Instance Method Details
#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.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 65 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}
108 109 110 111 112 113 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 108 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.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 136 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.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 194 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.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 246 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}
277 278 279 280 281 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 277 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}
308 309 310 311 312 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 308 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}
293 294 295 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 293 def organization_path organization: "organizations/#{organization}" end |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
324 325 326 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 324 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.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/google/cloud/dlp/v2/dlp_service/paths.rb', line 366 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 |