Module: Google::Cloud::Dataplex::V1::DataplexService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/dataplex/v1/dataplex_service/paths.rb

Overview

Path helper methods for the DataplexService API.

Instance Method Summary collapse

Instance Method Details

#asset_path(project:, location:, lake:, zone:, asset:) ⇒ ::String

Create a fully-qualified Asset resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}

Parameters:

  • project (String)
  • location (String)
  • lake (String)
  • zone (String)
  • asset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
47
48
# File 'lib/google/cloud/dataplex/v1/dataplex_service/paths.rb', line 41

def asset_path project:, location:, lake:, zone:, asset:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/"
  raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/"

  "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/assets/#{asset}"
end

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

Create a fully-qualified Environment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}

Parameters:

  • project (String)
  • location (String)
  • lake (String)
  • environment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


63
64
65
66
67
68
69
# File 'lib/google/cloud/dataplex/v1/dataplex_service/paths.rb', line 63

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

  "projects/#{project}/locations/#{location}/lakes/#{lake}/environments/#{environment}"
end

#job_path(project:, location:, lake:, task:, job:) ⇒ ::String

Create a fully-qualified Job resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}

Parameters:

  • project (String)
  • location (String)
  • lake (String)
  • task (String)
  • job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


85
86
87
88
89
90
91
92
# File 'lib/google/cloud/dataplex/v1/dataplex_service/paths.rb', line 85

def job_path project:, location:, lake:, task:, job:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/"
  raise ::ArgumentError, "task cannot contain /" if task.to_s.include? "/"

  "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}/jobs/#{job}"
end

#lake_path(project:, location:, lake:) ⇒ ::String

Create a fully-qualified Lake resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lakes/{lake}

Parameters:

  • project (String)
  • location (String)
  • lake (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


106
107
108
109
110
111
# File 'lib/google/cloud/dataplex/v1/dataplex_service/paths.rb', line 106

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

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


124
125
126
127
128
# File 'lib/google/cloud/dataplex/v1/dataplex_service/paths.rb', line 124

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

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

#task_path(project:, location:, lake:, task:) ⇒ ::String

Create a fully-qualified Task resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}

Parameters:

  • project (String)
  • location (String)
  • lake (String)
  • task (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


143
144
145
146
147
148
149
# File 'lib/google/cloud/dataplex/v1/dataplex_service/paths.rb', line 143

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

  "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}"
end

#zone_path(project:, location:, lake:, zone:) ⇒ ::String

Create a fully-qualified Zone resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}

Parameters:

  • project (String)
  • location (String)
  • lake (String)
  • zone (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


164
165
166
167
168
169
170
# File 'lib/google/cloud/dataplex/v1/dataplex_service/paths.rb', line 164

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

  "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}"
end