Skip to content

Commit

Permalink
feat: [google-cloud-dialogflow] add options of query_source, search_c…
Browse files Browse the repository at this point in the history
…onfig, 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 12, 2024
1 parent 5a281be commit ede7d85
Show file tree
Hide file tree
Showing 6 changed files with 428 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class ConversationsAsyncClient:
parse_cx_security_settings_path = staticmethod(
ConversationsClient.parse_cx_security_settings_path
)
data_store_path = staticmethod(ConversationsClient.data_store_path)
parse_data_store_path = staticmethod(ConversationsClient.parse_data_store_path)
document_path = staticmethod(ConversationsClient.document_path)
parse_document_path = staticmethod(ConversationsClient.parse_document_path)
generator_path = staticmethod(ConversationsClient.generator_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,30 @@ def parse_cx_security_settings_path(path: str) -> Dict[str, str]:
)
return m.groupdict() if m else {}

@staticmethod
def data_store_path(
project: str,
location: str,
collection: str,
data_store: str,
) -> str:
"""Returns a fully-qualified data_store string."""
return "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}".format(
project=project,
location=location,
collection=collection,
data_store=data_store,
)

@staticmethod
def parse_data_store_path(path: str) -> Dict[str, str]:
"""Parses a data_store path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/collections/(?P<collection>.+?)/dataStores/(?P<data_store>.+?)$",
path,
)
return m.groupdict() if m else {}

@staticmethod
def document_path(
project: str,
Expand Down
Loading

0 comments on commit ede7d85

Please sign in to comment.