Module: Google::Cloud::Workstations::V1beta::Workstations::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/workstations/v1beta/workstations/paths.rb

Overview

Path helper methods for the Workstations 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/workstations/v1beta/workstations/paths.rb', line 38

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

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

#workstation_cluster_path(project:, location:, workstation_cluster:) ⇒ ::String

Create a fully-qualified WorkstationCluster resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}

Parameters:

  • project (String)
  • location (String)
  • workstation_cluster (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


79
80
81
82
83
84
# File 'lib/google/cloud/workstations/v1beta/workstations/paths.rb', line 79

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

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

#workstation_config_path(project:, location:, workstation_cluster:, workstation_config:) ⇒ ::String

Create a fully-qualified WorkstationConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}

Parameters:

  • project (String)
  • location (String)
  • workstation_cluster (String)
  • workstation_config (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


99
100
101
102
103
104
105
# File 'lib/google/cloud/workstations/v1beta/workstations/paths.rb', line 99

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

  "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}"
end

#workstation_path(project:, location:, workstation_cluster:, workstation_config:, workstation:) ⇒ ::String

Create a fully-qualified Workstation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}

Parameters:

  • project (String)
  • location (String)
  • workstation_cluster (String)
  • workstation_config (String)
  • workstation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
64
65
# File 'lib/google/cloud/workstations/v1beta/workstations/paths.rb', line 58

def workstation_path project:, location:, workstation_cluster:, workstation_config:, workstation:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/"
  raise ::ArgumentError, "workstation_config cannot contain /" if workstation_config.to_s.include? "/"

  "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}/workstations/#{workstation}"
end