Module: Google::Cloud::DataCatalog::V1::DataCatalog::Paths

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

Overview

Path helper methods for the DataCatalog API.

Instance Method Summary collapse

Instance Method Details

#entry_group_path(project:, location:, entry_group:) ⇒ ::String

Create a fully-qualified EntryGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/entryGroups/{entry_group}

Parameters:

  • project (String)
  • location (String)
  • entry_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#entry_path(project:, location:, entry_group:, entry:) ⇒ ::String

Create a fully-qualified Entry resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}

Parameters:

  • project (String)
  • location (String)
  • entry_group (String)
  • entry (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}"
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)


78
79
80
81
82
# File 'lib/google/cloud/data_catalog/v1/data_catalog/paths.rb', line 78

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

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

#tag_path(project:, location:, entry_group:, entry:, tag:) ⇒ ::String

Create a fully-qualified Tag resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}

Parameters:

  • project (String)
  • location (String)
  • entry_group (String)
  • entry (String)
  • tag (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


98
99
100
101
102
103
104
105
# File 'lib/google/cloud/data_catalog/v1/data_catalog/paths.rb', line 98

def tag_path project:, location:, entry_group:, entry:, tag:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/"
  raise ::ArgumentError, "entry cannot contain /" if entry.to_s.include? "/"

  "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}/tags/#{tag}"
end

#tag_template_field_enum_value_path(project:, location:, tag_template:, tag_template_field_id:, enum_value_display_name:) ⇒ ::String

Create a fully-qualified TagTemplateFieldEnumValue resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}

Parameters:

  • project (String)
  • location (String)
  • tag_template (String)
  • tag_template_field_id (String)
  • enum_value_display_name (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


161
162
163
164
165
166
167
168
# File 'lib/google/cloud/data_catalog/v1/data_catalog/paths.rb', line 161

def tag_template_field_enum_value_path project:, location:, tag_template:, tag_template_field_id:, enum_value_display_name:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "tag_template cannot contain /" if tag_template.to_s.include? "/"
  raise ::ArgumentError, "tag_template_field_id cannot contain /" if tag_template_field_id.to_s.include? "/"

  "projects/#{project}/locations/#{location}/tagTemplates/#{tag_template}/fields/#{tag_template_field_id}/enumValues/#{enum_value_display_name}"
end

#tag_template_field_path(project:, location:, tag_template:, field:) ⇒ ::String

Create a fully-qualified TagTemplateField resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}

Parameters:

  • project (String)
  • location (String)
  • tag_template (String)
  • field (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


139
140
141
142
143
144
145
# File 'lib/google/cloud/data_catalog/v1/data_catalog/paths.rb', line 139

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

  "projects/#{project}/locations/#{location}/tagTemplates/#{tag_template}/fields/#{field}"
end

#tag_template_path(project:, location:, tag_template:) ⇒ ::String

Create a fully-qualified TagTemplate resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tagTemplates/{tag_template}

Parameters:

  • project (String)
  • location (String)
  • tag_template (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


119
120
121
122
123
124
# File 'lib/google/cloud/data_catalog/v1/data_catalog/paths.rb', line 119

def tag_template_path project:, location:, tag_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}/tagTemplates/#{tag_template}"
end