Module: Google::Cloud::AIPlatform::V1::PredictionService::Paths

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

Overview

Path helper methods for the PredictionService API.

Instance Method Summary collapse

Instance Method Details

#endpoint_path(project:, location:, endpoint:) ⇒ ::String

Create a fully-qualified Endpoint resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/endpoints/{endpoint}

Parameters:

  • project (String)
  • location (String)
  • endpoint (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/ai_platform/v1/prediction_service/paths.rb', line 39

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

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