Module: Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/dialogflow/v2/generator_evaluations/paths.rb

Overview

Path helper methods for the GeneratorEvaluations API.

Instance Method Summary collapse

Instance Method Details

#generator_evaluation_path(project:, location:, generator:, evaluation:) ⇒ ::String

Create a fully-qualified GeneratorEvaluation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/generators/{generator}/evaluations/{evaluation}

Parameters:

  • project (String)
  • location (String)
  • generator (String)
  • evaluation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
65
# File 'lib/google/cloud/dialogflow/v2/generator_evaluations/paths.rb', line 59

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

  "projects/#{project}/locations/#{location}/generators/#{generator}/evaluations/#{evaluation}"
end

#generator_path(project:, location:, generator:) ⇒ ::String

Create a fully-qualified Generator resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/generators/{generator}

Parameters:

  • project (String)
  • location (String)
  • generator (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/dialogflow/v2/generator_evaluations/paths.rb', line 39

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

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

#tool_path(project:, location:, tool:) ⇒ ::String

Create a fully-qualified Tool resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tools/{tool}

Parameters:

  • project (String)
  • location (String)
  • tool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


79
80
81
82
83
84
# File 'lib/google/cloud/dialogflow/v2/generator_evaluations/paths.rb', line 79

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

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