Skip to content

Commit ede7d85

Browse files
feat: [google-cloud-dialogflow] add options of query_source, search_config, end_user_metadata and exact_search (#13267)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: expose metadata in AnswerSource feat: add options of query_source, search_config, end_user_metadata and exact_search END_COMMIT_OVERRIDE PiperOrigin-RevId: 695456323 Source-Link: googleapis/googleapis@8081c74 Source-Link: googleapis/googleapis-gen@a74e716 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6ImE3NGU3MTZiMjM0NWE4NjlkMjVjMmZlYWRmMjBjOWE0M2IxY2Y0NjkifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 5a281be commit ede7d85

File tree

6 files changed

+428
-45
lines changed

6 files changed

+428
-45
lines changed

packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/async_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ class ConversationsAsyncClient:
9494
parse_cx_security_settings_path = staticmethod(
9595
ConversationsClient.parse_cx_security_settings_path
9696
)
97+
data_store_path = staticmethod(ConversationsClient.data_store_path)
98+
parse_data_store_path = staticmethod(ConversationsClient.parse_data_store_path)
9799
document_path = staticmethod(ConversationsClient.document_path)
98100
parse_document_path = staticmethod(ConversationsClient.parse_document_path)
99101
generator_path = staticmethod(ConversationsClient.generator_path)

packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,30 @@ def parse_cx_security_settings_path(path: str) -> Dict[str, str]:
306306
)
307307
return m.groupdict() if m else {}
308308

309+
@staticmethod
310+
def data_store_path(
311+
project: str,
312+
location: str,
313+
collection: str,
314+
data_store: str,
315+
) -> str:
316+
"""Returns a fully-qualified data_store string."""
317+
return "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}".format(
318+
project=project,
319+
location=location,
320+
collection=collection,
321+
data_store=data_store,
322+
)
323+
324+
@staticmethod
325+
def parse_data_store_path(path: str) -> Dict[str, str]:
326+
"""Parses a data_store path into its component segments."""
327+
m = re.match(
328+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/collections/(?P<collection>.+?)/dataStores/(?P<data_store>.+?)$",
329+
path,
330+
)
331+
return m.groupdict() if m else {}
332+
309333
@staticmethod
310334
def document_path(
311335
project: str,

0 commit comments

Comments
 (0)