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

Extended by:
Paths
Included in:
Client, Paths
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

#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)


99
100
101
102
103
# File 'lib/google/cloud/ai_platform/v1/dataset_service/paths.rb', line 99

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

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