Module: Google::Cloud::AIPlatform::V1::DatasetService::Paths

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

Overview

Path helper methods for the DatasetService API.

Instance Method Summary collapse

Instance Method Details

#annotation_spec_path(project:, location:, dataset:, annotation_spec:) ⇒ ::String

Create a fully-qualified AnnotationSpec resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)
  • annotation_spec (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}"
end

#data_item_path(project:, location:, dataset:, data_item:) ⇒ ::String

Create a fully-qualified DataItem resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)
  • data_item (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


61
62
63
64
65
66
67
# File 'lib/google/cloud/ai_platform/v1/dataset_service/paths.rb', line 61

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

  "projects/#{project}/locations/#{location}/datasets/#{dataset}/dataItems/#{data_item}"
end

#dataset_path(project:, location:, dataset:) ⇒ ::String

Create a fully-qualified Dataset resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


81
82
83
84
85
86
# File 'lib/google/cloud/ai_platform/v1/dataset_service/paths.rb', line 81

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

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

#dataset_version_path(project:, location:, dataset:, dataset_version:) ⇒ ::String

Create a fully-qualified DatasetVersion resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)
  • dataset_version (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


101
102
103
104
105
106
107
# File 'lib/google/cloud/ai_platform/v1/dataset_service/paths.rb', line 101

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

  "projects/#{project}/locations/#{location}/datasets/#{dataset}/datasetVersions/#{dataset_version}"
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)


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

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

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

#saved_query_path(project:, location:, dataset:, saved_query:) ⇒ ::String

Create a fully-qualified SavedQuery resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)
  • saved_query (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/datasets/#{dataset}/savedQueries/#{saved_query}"
end