Module: Google::Cloud::Dialogflow::CX::V3::Generators::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/dialogflow/cx/v3/generators/paths.rb

Overview

Path helper methods for the Generators API.

Instance Method Summary collapse

Instance Method Details

#agent_path(project:, location:, agent:) ⇒ ::String

Create a fully-qualified Agent resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/agents/{agent}

Parameters:

  • project (String)
  • location (String)
  • agent (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
# File 'lib/google/cloud/dialogflow/cx/v3/generators/paths.rb', line 40

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

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

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

Create a fully-qualified Generator resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
66
# File 'lib/google/cloud/dialogflow/cx/v3/generators/paths.rb', line 60

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

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