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

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

Overview

Path helper methods for the Intents 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/intents/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

#entity_type_path(project:, location:, agent:, entity_type:) ⇒ ::String

Create a fully-qualified EntityType resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def entity_type_path project:, location:, agent:, entity_type:
  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}/entityTypes/#{entity_type}"
end

#intent_path(project:, location:, agent:, intent:) ⇒ ::String

Create a fully-qualified Intent resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


81
82
83
84
85
86
87
# File 'lib/google/cloud/dialogflow/cx/v3/intents/paths.rb', line 81

def intent_path project:, location:, agent:, intent:
  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}/intents/#{intent}"
end