Module: Google::Cloud::AIPlatform::V1::TensorboardService::Paths

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

Overview

Path helper methods for the TensorboardService API.

Instance Method Summary collapse

Instance Method Details

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


38
39
40
41
42
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/paths.rb', line 38

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

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

#tensorboard_experiment_path(project:, location:, tensorboard:, experiment:) ⇒ ::String

Create a fully-qualified TensorboardExperiment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}

Parameters:

  • project (String)
  • location (String)
  • tensorboard (String)
  • experiment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


76
77
78
79
80
81
82
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/paths.rb', line 76

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

  "projects/#{project}/locations/#{location}/tensorboards/#{tensorboard}/experiments/#{experiment}"
end

#tensorboard_path(project:, location:, tensorboard:) ⇒ ::String

Create a fully-qualified Tensorboard resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tensorboards/{tensorboard}

Parameters:

  • project (String)
  • location (String)
  • tensorboard (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#tensorboard_run_path(project:, location:, tensorboard:, experiment:, run:) ⇒ ::String

Create a fully-qualified TensorboardRun resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}

Parameters:

  • project (String)
  • location (String)
  • tensorboard (String)
  • experiment (String)
  • run (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def tensorboard_run_path project:, location:, tensorboard:, experiment:, run:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "tensorboard cannot contain /" if tensorboard.to_s.include? "/"
  raise ::ArgumentError, "experiment cannot contain /" if experiment.to_s.include? "/"

  "projects/#{project}/locations/#{location}/tensorboards/#{tensorboard}/experiments/#{experiment}/runs/#{run}"
end

#tensorboard_time_series_path(project:, location:, tensorboard:, experiment:, run:, time_series:) ⇒ ::String

Create a fully-qualified TensorboardTimeSeries resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}

Parameters:

  • project (String)
  • location (String)
  • tensorboard (String)
  • experiment (String)
  • run (String)
  • time_series (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


122
123
124
125
126
127
128
129
130
# File 'lib/google/cloud/ai_platform/v1/tensorboard_service/paths.rb', line 122

def tensorboard_time_series_path project:, location:, tensorboard:, experiment:, run:, time_series:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "tensorboard cannot contain /" if tensorboard.to_s.include? "/"
  raise ::ArgumentError, "experiment cannot contain /" if experiment.to_s.include? "/"
  raise ::ArgumentError, "run cannot contain /" if run.to_s.include? "/"

  "projects/#{project}/locations/#{location}/tensorboards/#{tensorboard}/experiments/#{experiment}/runs/#{run}/timeSeries/#{time_series}"
end