Module: Google::Cloud::Dataplex::V1::ContentService::Paths

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

Overview

Path helper methods for the ContentService API.

Instance Method Summary collapse

Instance Method Details

#content_path(project:, location:, lake:, content:) ⇒ ::String

Create a fully-qualified Content resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def content_path project:, location:, lake:, content:
  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}/content/#{content}"
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)


60
61
62
63
64
65
# File 'lib/google/cloud/dataplex/v1/content_service/paths.rb', line 60

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