Module: Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Paths

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

Overview

Path helper methods for the ContactCenterInsights API.

Instance Method Summary collapse

Instance Method Details

#analysis_path(project:, location:, conversation:, analysis:) ⇒ ::String

Create a fully-qualified Analysis resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}

Parameters:

  • project (String)
  • location (String)
  • conversation (String)
  • analysis (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 40

def analysis_path project:, location:, conversation:, analysis:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"

  "projects/#{project}/locations/#{location}/conversations/#{conversation}/analyses/#{analysis}"
end

#conversation_path(project:, location:, conversation:) ⇒ ::String

Create a fully-qualified Conversation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/conversations/{conversation}

Parameters:

  • project (String)
  • location (String)
  • conversation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 60

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

  "projects/#{project}/locations/#{location}/conversations/#{conversation}"
end

#conversation_profile_path(project:, location:, conversation_profile:) ⇒ ::String

Create a fully-qualified ConversationProfile resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}

Parameters:

  • project (String)
  • location (String)
  • conversation_profile (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


79
80
81
82
83
84
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 79

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

  "projects/#{project}/locations/#{location}/conversationProfiles/#{conversation_profile}"
end

#encryption_spec_path(project:, location:) ⇒ ::String

Create a fully-qualified EncryptionSpec resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/encryptionSpec

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


97
98
99
100
101
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 97

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

  "projects/#{project}/locations/#{location}/encryptionSpec"
end

#issue_model_path(project:, location:, issue_model:) ⇒ ::String

Create a fully-qualified IssueModel resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/issueModels/{issue_model}

Parameters:

  • project (String)
  • location (String)
  • issue_model (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


136
137
138
139
140
141
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 136

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

  "projects/#{project}/locations/#{location}/issueModels/#{issue_model}"
end

#issue_path(project:, location:, issue_model:, issue:) ⇒ ::String

Create a fully-qualified Issue resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}

Parameters:

  • project (String)
  • location (String)
  • issue_model (String)
  • issue (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


116
117
118
119
120
121
122
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 116

def issue_path project:, location:, issue_model:, issue:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "issue_model cannot contain /" if issue_model.to_s.include? "/"

  "projects/#{project}/locations/#{location}/issueModels/#{issue_model}/issues/#{issue}"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


154
155
156
157
158
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 154

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

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

#participant_path(project: , conversation: , participant: ) ⇒ ::String #participant_path(project: , location: , conversation: , participant: ) ⇒ ::String

Create a fully-qualified Participant resource string.

Overloads:

  • #participant_path(project: , conversation: , participant: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/conversations/{conversation}/participants/{participant}

    Parameters:

    • project (String) (defaults to: )
    • conversation (String) (defaults to: )
    • participant (String) (defaults to: )
  • #participant_path(project: , location: , conversation: , participant: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • conversation (String) (defaults to: )
    • participant (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 183

def participant_path **args
  resources = {
    "conversation:participant:project" => (proc do |project:, conversation:, participant:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
      raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"

      "projects/#{project}/conversations/#{conversation}/participants/#{participant}"
    end),
    "conversation:location:participant:project" => (proc do |project:, location:, conversation:, participant:|
      raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
      raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
      raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"

      "projects/#{project}/locations/#{location}/conversations/#{conversation}/participants/#{participant}"
    end)
  }

  resource = resources[args.keys.sort.join(":")]
  raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
  resource.call(**args)
end

#phrase_matcher_path(project:, location:, phrase_matcher:) ⇒ ::String

Create a fully-qualified PhraseMatcher resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}

Parameters:

  • project (String)
  • location (String)
  • phrase_matcher (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


217
218
219
220
221
222
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 217

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

  "projects/#{project}/locations/#{location}/phraseMatchers/#{phrase_matcher}"
end

#recognizer_path(project:, location:, recognizer:) ⇒ ::String

Create a fully-qualified Recognizer resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/recognizers/{recognizer}

Parameters:

  • project (String)
  • location (String)
  • recognizer (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


236
237
238
239
240
241
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 236

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

  "projects/#{project}/locations/#{location}/recognizers/#{recognizer}"
end

#settings_path(project:, location:) ⇒ ::String

Create a fully-qualified Settings resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/settings

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


254
255
256
257
258
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 254

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

  "projects/#{project}/locations/#{location}/settings"
end

#view_path(project:, location:, view:) ⇒ ::String

Create a fully-qualified View resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/views/{view}

Parameters:

  • project (String)
  • location (String)
  • view (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


272
273
274
275
276
277
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb', line 272

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

  "projects/#{project}/locations/#{location}/views/#{view}"
end