Module: Google::Cloud::Notebooks::V1beta1::NotebookService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/notebooks/v1beta1/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/v1beta1/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

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


55
56
57
58
59
# File 'lib/google/cloud/notebooks/v1beta1/notebook_service/paths.rb', line 55

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

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