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

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

Overview

Path helper methods for the Pages API.

Instance Method Summary collapse

Instance Method Details

#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)


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

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

#flow_path(project:, location:, agent:, flow:) ⇒ ::String

Create a fully-qualified Flow resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


62
63
64
65
66
67
68
# File 'lib/google/cloud/dialogflow/cx/v3/pages/paths.rb', line 62

def flow_path project:, location:, agent:, flow:
  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}/flows/#{flow}"
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)


83
84
85
86
87
88
89
# File 'lib/google/cloud/dialogflow/cx/v3/pages/paths.rb', line 83

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

#page_path(project:, location:, agent:, flow:, page:) ⇒ ::String

Create a fully-qualified Page resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}

Parameters:

  • project (String)
  • location (String)
  • agent (String)
  • flow (String)
  • page (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


105
106
107
108
109
110
111
112
# File 'lib/google/cloud/dialogflow/cx/v3/pages/paths.rb', line 105

def page_path project:, location:, agent:, flow:, page:
  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? "/"
  raise ::ArgumentError, "flow cannot contain /" if flow.to_s.include? "/"

  "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/pages/#{page}"
end

#transition_route_group_path(project:, location:, agent:, flow:, transition_route_group:) ⇒ ::String

Create a fully-qualified TransitionRouteGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}

Parameters:

  • project (String)
  • location (String)
  • agent (String)
  • flow (String)
  • transition_route_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


128
129
130
131
132
133
134
135
# File 'lib/google/cloud/dialogflow/cx/v3/pages/paths.rb', line 128

def transition_route_group_path project:, location:, agent:, flow:, transition_route_group:
  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? "/"
  raise ::ArgumentError, "flow cannot contain /" if flow.to_s.include? "/"

  "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/transitionRouteGroups/#{transition_route_group}"
end

#webhook_path(project:, location:, agent:, webhook:) ⇒ ::String

Create a fully-qualified Webhook resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


150
151
152
153
154
155
156
# File 'lib/google/cloud/dialogflow/cx/v3/pages/paths.rb', line 150

def webhook_path project:, location:, agent:, webhook:
  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}/webhooks/#{webhook}"
end