Module: Google::Cloud::Notebooks::V1::NotebookService::Paths

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

Overview

Path helper methods for the NotebookService API.

Instance Method Summary collapse

Instance Method Details

#environment_path(project:, environment:) ⇒ ::String

Create a fully-qualified Environment resource string.

The resource will be in the following format:

projects/{project}/environments/{environment}

Parameters:

  • project (String)
  • environment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def environment_path project:, environment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/environments/#{environment}"
end

#execution_path(project:, location:, execution:) ⇒ ::String

Create a fully-qualified Execution resource string.

The resource will be in the following format:

projects/{project}/location/{location}/executions/{execution}

Parameters:

  • project (String)
  • location (String)
  • execution (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/location/#{location}/executions/#{execution}"
end

#instance_path(project:, instance:) ⇒ ::String

Create a fully-qualified Instance resource string.

The resource will be in the following format:

projects/{project}/instances/{instance}

Parameters:

  • project (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


74
75
76
77
78
# File 'lib/google/cloud/notebooks/v1/notebook_service/paths.rb', line 74

def instance_path project:, instance:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/instances/#{instance}"
end

#schedule_path(project:, location:, schedule:) ⇒ ::String

Create a fully-qualified Schedule resource string.

The resource will be in the following format:

projects/{project}/location/{location}/schedules/{schedule}

Parameters:

  • project (String)
  • location (String)
  • schedule (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


92
93
94
95
96
97
# File 'lib/google/cloud/notebooks/v1/notebook_service/paths.rb', line 92

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

  "projects/#{project}/location/#{location}/schedules/#{schedule}"
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)


111
112
113
114
115
116
# File 'lib/google/cloud/notebooks/v1/notebook_service/paths.rb', line 111

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