Module: Google::Cloud::AIPlatform::V1::VizierService::Paths

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

Overview

Path helper methods for the VizierService API.

Instance Method Summary collapse

Instance Method Details

#custom_job_path(project:, location:, custom_job:) ⇒ ::String

Create a fully-qualified CustomJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/customJobs/{custom_job}

Parameters:

  • project (String)
  • location (String)
  • custom_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/ai_platform/v1/vizier_service/paths.rb', line 39

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

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


57
58
59
60
61
# File 'lib/google/cloud/ai_platform/v1/vizier_service/paths.rb', line 57

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

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

#study_path(project:, location:, study:) ⇒ ::String

Create a fully-qualified Study resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/studies/{study}

Parameters:

  • project (String)
  • location (String)
  • study (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


75
76
77
78
79
80
# File 'lib/google/cloud/ai_platform/v1/vizier_service/paths.rb', line 75

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

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

#trial_path(project:, location:, study:, trial:) ⇒ ::String

Create a fully-qualified Trial resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/studies/{study}/trials/{trial}

Parameters:

  • project (String)
  • location (String)
  • study (String)
  • trial (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


95
96
97
98
99
100
101
# File 'lib/google/cloud/ai_platform/v1/vizier_service/paths.rb', line 95

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

  "projects/#{project}/locations/#{location}/studies/#{study}/trials/#{trial}"
end