Module: Google::Cloud::Gaming::V1::GameServerConfigsService::Paths

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

Overview

Path helper methods for the GameServerConfigsService API.

Instance Method Summary collapse

Instance Method Details

#game_server_config_path(project:, location:, deployment:, config:) ⇒ ::String

Create a fully-qualified GameServerConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}

Parameters:

  • project (String)
  • location (String)
  • deployment (String)
  • config (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/gaming/v1/game_server_configs_service/paths.rb', line 40

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

  "projects/#{project}/locations/#{location}/gameServerDeployments/#{deployment}/configs/#{config}"
end

#game_server_deployment_path(project:, location:, deployment:) ⇒ ::String

Create a fully-qualified GameServerDeployment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}

Parameters:

  • project (String)
  • location (String)
  • deployment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
# File 'lib/google/cloud/gaming/v1/game_server_configs_service/paths.rb', line 60

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

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