Skip to content

Commit b7564b2

Browse files
telpirionTrucHLegcf-owl-bot[bot]renovate-botrelease-please[bot]
committed
chore(contact-center-insights): migrate code from googleapis/python-contact-center-insights (#8996)
* samples: enable pubsub notifications (#13) * samples: initial update pubsub notifications samples * Make the sample closely resemble the public Curl snippet * Rearrange tech writer tags * Clean up tests * move region tags * use fstring * use built-in settings path builder * remove region tag from helper function * Fix code samples according to review * add pytest to requirements-test.txt * Use double quotes for consistency * Assert message in test * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * reorder import groups * lint * Use pytest fixture and autoformat with Nox * disable pubsub notifications when tearing down test Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Eric Schmidt <erschmid@google.com> * chore(deps): update all dependencies (#39) * chore(deps): update all dependencies * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update dependency google-cloud-pubsub to v2.8.0 (#40) * samples: export data to BigQuery (#45) * feat: filter is used to filter conversations used for issue model training feat: update_time is used to indicate when the phrase matcher was updated (#48) * samples: create custom highlights (#15) * samples: set project-level TTL (#23) * samples: create topic model (#28) * samples: create conversation (#42) * samples: create analysis (#44) * samples: create conversation with TTL (#43) * samples: get operation (#24) * chore: release 0.3.1 (#52) :robot: I have created a release \*beep\* \*boop\* --- ### [0.3.1](https://www.github.com/googleapis/python-contact-center-insights/compare/v0.3.0...v0.3.1) (2021-09-24) ### Bug Fixes * add 'dict' annotation type to 'request' ([94e64ac](https://www.github.com/googleapis/python-contact-center-insights/commit/94e64acc866eeed789768c2e216dad3f561c81e3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore: Update owlbot.py (#53) * Update owlbot.py Update copyright year to unblock googleapis/python-contact-center-insights#46 https://github.com/googleapis/python-contact-center-insights/pull/46/files#r717178756 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: edit owlbot.py copyright yeat chore: Update copyright year to unblock #46 https://github.com/googleapis/python-contact-center-insights/pull/46/files#r717178756 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update all dependencies (#46) * chore(deps): update dependency google-auth to v2.2.1 (#55) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-auth](https://togithub.com/googleapis/google-auth-library-python) | `==2.2.0` -> `==2.2.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-auth/2.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-auth/2.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-auth/2.2.1/compatibility-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-auth/2.2.1/confidence-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/google-auth-library-python</summary> ### [`v2.2.1`](https://togithub.com/googleapis/google-auth-library-python/blob/master/CHANGELOG.md#&#8203;221-httpswwwgithubcomgoogleapisgoogle-auth-library-pythoncomparev220v221-2021-09-28) [Compare Source](https://togithub.com/googleapis/google-auth-library-python/compare/v2.2.0...v2.2.1) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-contact-center-insights). * chore(deps): update dependency google-cloud-contact-center-insights to v0.4.0 (#57) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-contact-center-insights](https://togithub.com/googleapis/python-contact-center-insights) | `==0.3.1` -> `==0.4.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-contact-center-insights/0.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-contact-center-insights/0.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-contact-center-insights/0.4.0/compatibility-slim/0.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-contact-center-insights/0.4.0/confidence-slim/0.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/python-contact-center-insights</summary> ### [`v0.4.0`](https://togithub.com/googleapis/python-contact-center-insights/blob/master/CHANGELOG.md#&#8203;040-httpswwwgithubcomgoogleapispython-contact-center-insightscomparev031v040-2021-09-29) [Compare Source](https://togithub.com/googleapis/python-contact-center-insights/compare/v0.3.1...v0.4.0) ##### Features - add metadata from dialogflow related to transcript segment ([#&#8203;54](https://www.togithub.com/googleapis/python-contact-center-insights/issues/54)) ([ef575cf](https://www.github.com/googleapis/python-contact-center-insights/commit/ef575cf076376261c784b9c3332ef2befa1a11d9)) - add obfuscated if from dialogflow ([ef575cf](https://www.github.com/googleapis/python-contact-center-insights/commit/ef575cf076376261c784b9c3332ef2befa1a11d9)) - add sentiment data for transcript segment ([ef575cf](https://www.github.com/googleapis/python-contact-center-insights/commit/ef575cf076376261c784b9c3332ef2befa1a11d9)) ##### [0.3.1](https://www.github.com/googleapis/python-contact-center-insights/compare/v0.3.0...v0.3.1) (2021-09-24) ##### Bug Fixes - add 'dict' annotation type to 'request' ([94e64ac](https://www.github.com/googleapis/python-contact-center-insights/commit/94e64acc866eeed789768c2e216dad3f561c81e3)) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-contact-center-insights). * chore: fail samples nox session if python version is missing (#60) * chore(deps): update dependency google-cloud-bigquery to v2.28.0 (#61) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | `==2.27.1` -> `==2.28.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.28.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.28.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.28.0/compatibility-slim/2.27.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.28.0/confidence-slim/2.27.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/python-bigquery</summary> ### [`v2.28.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#&#8203;2280-httpswwwgithubcomgoogleapispython-bigquerycomparev2271v2280-2021-09-30) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v2.27.1...v2.28.0) ##### Features - add `AvroOptions` to configure AVRO external data ([#&#8203;994](https://www.togithub.com/googleapis/python-bigquery/issues/994)) ([1a9431d](https://www.github.com/googleapis/python-bigquery/commit/1a9431d9e02eeb99e4712b61c623f9cca80134a6)) ##### Documentation - link to stable pandas docs ([#&#8203;990](https://www.togithub.com/googleapis/python-bigquery/issues/990)) ([ea50e80](https://www.github.com/googleapis/python-bigquery/commit/ea50e8031fc035b3772a338bc00982de263cefad)) ##### [2.27.1](https://www.github.com/googleapis/python-bigquery/compare/v2.27.0...v2.27.1) (2021-09-27) ##### Bug Fixes - remove py.typed since package fails mypy check ([#&#8203;988](https://www.togithub.com/googleapis/python-bigquery/issues/988)) ([39030f2](https://www.github.com/googleapis/python-bigquery/commit/39030f26ce081cfacd456b84694c68e3f04ed48d)) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-contact-center-insights). * chore(deps): update dependency google-cloud-contact-center-insights to v0.5.0 (#65) Co-authored-by: nicain <nicain.seattle@gmail.com> * chore(deps): update all dependencies (#67) * chore(python): Add kokoro configs for python 3.10 samples testing (#71) * chore(deps): update all dependencies (#69) Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#74) * chore: delete owlbot.py (#75) * chore: delete owlbot.py * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update dependency protobuf to v3.19.0 (#77) * chore(deps): update dependency google-auth to v2.3.1 (#78) * chore(deps): update dependency google-api-core to v2.2.0 (#81) * chore(deps): update dependency google-auth to v2.3.2 (#82) * chore(deps): update dependency google-cloud-bigquery to v2.29.0 (#83) * chore(deps): update all dependencies (#84) * chore(deps): update dependency google-auth to v2.3.3 (#87) * chore(deps): update dependency google-cloud-contact-center-insights to v0.6.1 (#88) * chore(deps): update dependency google-api-core to v2.2.2 (#90) Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#92) * chore(deps): update all dependencies (#94) * chore(deps): update all dependencies * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency google-cloud-contact-center-insights to v1.1.0 (#98) * chore(deps): update dependency google-cloud-pubsub to v2.9.0 (#100) * chore(deps): update dependency google-cloud-bigquery to v2.31.0 (#106) * chore(deps): update dependency google-api-core to v2.3.0 (#108) * chore(python): fix undefined name 'glob' in samples noxfile (#116) Source-Link: googleapis/synthtool@52aef91 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:36a95b8f494e4674dc9eee9af98961293b51b86b3649942aac800ae6c1f796d4 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(python): Noxfile recognizes that tests can live in a folder (#122) Source-Link: googleapis/synthtool@4760d8d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f0e4b51deef56bed74d3e2359c583fc104a8d6367da3984fc5c66938db738828 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore: use gapic-generator-python 0.63.2 (#131) * chore: use gapic-generator-python 0.63.2 docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: googleapis/googleapis@55b9e1e Source-Link: googleapis/googleapis-gen@bf4e86b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore: use gapic-generator-python 0.63.4 (#132) * chore: use gapic-generator-python 0.63.4 chore: fix snippet region tag format chore: fix docstring code block formatting PiperOrigin-RevId: 430730865 Source-Link: googleapis/googleapis@ea58002 Source-Link: googleapis/googleapis-gen@ca893ff Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2E4OTNmZjhhZjI1ZmM3ZmUwMDFkZTE0MDVhNTE3ZDgwNDQ2ZWNjYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: delete duplicates Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> * chore: update copyright year to 2022 (#133) * chore: update copyright year to 2022 PiperOrigin-RevId: 431037888 Source-Link: googleapis/googleapis@b3397f5 Source-Link: googleapis/googleapis-gen@510b54e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTEwYjU0ZTFjZGVmZDUzMTczOTg0ZGYxNjY0NTA4MTMwOGZlODk3ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * fix(deps): require google-api-core>=1.31.5, >=2.3.2 (#136) * chore: Adding support for pytest-xdist and pytest-parallel (#137) Source-Link: googleapis/synthtool@82f5cb2 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5d8da01438ece4021d135433f2cf3227aa39ef0eaccc941d62aa35e6902832ae Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#140) * chore(deps): update all dependencies (#141) * chore(deps): update dependency google-api-core to v2.7.0 (#142) * chore(deps): update all dependencies (#143) * chore(deps): update dependency pytest to v7.1.0 (#144) * chore(deps): update all dependencies (#145) * chore(python): use black==22.3.0 (#147) Source-Link: googleapis/synthtool@6fab84a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe * chore(deps): update dependency google-cloud-bigquery to v3 (#148) * chore(deps): update dependency protobuf to v3.20.0 (#153) * chore(deps): update dependency google-cloud-pubsub to v2.12.0 (#155) * chore(deps): update dependency google-auth to v2.6.3 (#157) * chore(deps): update dependency google-auth to v2.6.4 (#160) * chore(deps): update dependency google-api-core to v2.7.2 (#161) * chore: use gapic-generator-python 0.65.1 (#162) * chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: googleapis/googleapis@2a27391 Source-Link: googleapis/googleapis-gen@ab6756a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency google-auth to v2.6.5 (#163) * chore(python): add nox session to sort python imports (#164) Source-Link: googleapis/synthtool@1b71c10 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update all dependencies (#167) * chore(deps): update dependency pytest to v7.1.2 (#168) * samples: Add docstring to all code samples (#171) * samples: Add docstring to all code samples * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update dependency google-api-core to v2.7.3 (#172) * chore(deps): update dependency google-cloud-bigquery to v3.1.0 (#176) * chore(deps): update dependency google-cloud-pubsub to v2.12.1 (#177) * chore(deps): update dependency google-api-core to v2.8.0 (#178) * chore(deps): update dependency google-api-core to v2.8.1 (#196) * fix: require python 3.7+ (#209) * chore(python): drop python 3.6 Source-Link: googleapis/synthtool@4f89b13 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c * add api_description to .repo-metadata.json * require python 3.7+ in setup.py * remove python 3.6 sample configs * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix typo * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#204) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert * revert * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#217) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert * remove protobuf * remove protobuf Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#219) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update all dependencies (#220) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency google-cloud-pubsub to v2.13.5 (#222) * chore(deps): update dependency google-cloud-pubsub to v2.13.6 (#225) * chore(deps): update all dependencies (#228) * chore(deps): update dependency google-auth to v2.11.0 (#229) Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency google-cloud-contact-center-insights to v1.4.3 (#232) * chore(deps): update dependency google-api-core to v2.10.0 (#238) * chore(deps): update dependency google-api-core to v2.10.0 * revert Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency pytest to v7.1.3 (#242) * chore: Bump gapic-generator-python version to 1.3.0 (#243) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 472561635 Source-Link: googleapis/googleapis@332ecf5 Source-Link: googleapis/googleapis-gen@4313d68 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDMxM2Q2ODI4ODBmZDlkNzI0NzI5MTE2NGQ0ZTlkM2Q1YmQ5ZjE3NyJ9 * chore: detect samples tests in nested directories (#246) Source-Link: googleapis/synthtool@50db768 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978 * chore(deps): update dependency google-api-core to v2.10.1 (#247) * chore(deps): update dependency google-auth to v2.11.1 (#248) * chore(deps): update all dependencies (#249) Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(deps): update dependency google-cloud-contact-center-insights to v1.4.4 (#252) * chore(deps): update dependency google-api-core to v2.10.2 (#255) * chore(deps): update dependency google-cloud-contact-center-insights to v1.4.5 (#256) * chore(deps): update all dependencies (#257) * chore(deps): update dependency pytest to v7.2.0 (#258) * chore(deps): update dependency google-auth to v2.14.0 (#260) * chore(deps): update all dependencies (#261) * chore: Update gapic-generator-python to v1.6.1 (#259) * chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: googleapis/googleapis-gen@c8aa327 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * add owlbot.py to exclude generated gapic_version.py * set manifest to true in .github/release-please.yml * add release-please-config.json * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: googleapis/googleapis-gen@61ef576 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: googleapis/googleapis-gen@ab0e217 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: googleapis/googleapis-gen@555c094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(python): drop flake8-import-order in samples noxfile (#266) Source-Link: googleapis/synthtool@6ed3a83 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3abfa0f1886adaf0b83f07cb117b24a639ea1cb9cffe56d43280b977033563eb Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#268) * fix(deps): Require google-api-core >=1.34.0, >=2.11.0 fix: Drop usage of pkg_resources fix: Fix timeout default values docs(samples): Snippetgen should call await on the operation coroutine before calling result PiperOrigin-RevId: 493260409 Source-Link: googleapis/googleapis@fea4387 Source-Link: googleapis/googleapis-gen@387b734 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzg3YjczNDRjNzUyOWVlNDRiZTg0ZTYxM2IxOWE4MjA1MDhjNjEyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add gapic_version.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> * feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Issue Apis (#270) * feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Issue Apis PiperOrigin-RevId: 495057883 Source-Link: googleapis/googleapis@59a66eb Source-Link: googleapis/googleapis-gen@9e7f289 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWU3ZjI4OWM2YzZlNGZkNWY2M2I2ZGNmZWUwZDI3MmFiMWRjYTFkZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update all dependencies (#267) Co-authored-by: Anthonios Partheniou <partheniou@google.com> * chore(main): release 1.5.0 (#265) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency google-cloud-contact-center-insights to v1.5.0 (#271) * chore(python): add support for python 3.11 (#272) Source-Link: googleapis/synthtool@7197a00 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update dependency google-auth to v2.16.0 (#273) * feat: Add support for python 3.11 (#274) * feat: Add support for python 3.11 chore: Update gapic-generator-python to v1.8.0 PiperOrigin-RevId: 500768693 Source-Link: googleapis/googleapis@190b612 Source-Link: googleapis/googleapis-gen@7bf29a4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(main): release 1.6.0 (#275) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency google-cloud-pubsub to v2.13.12 (#276) * chore(deps): update dependency google-cloud-contact-center-insights to v1.6.0 (#277) * chore(deps): update dependency pytest to v7.2.1 (#278) * removed 'generated_samples' * trying to add noxfile * noxfile Co-authored-by: Bamboo Le <8941262+TrucHLe@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: WhiteSource Renovate <renovate@whitesourcesoftware.com> Co-authored-by: WhiteSource Renovate <bot@renovateapp.com> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: nicain <nicain.seattle@gmail.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
1 parent dbe945f commit b7564b2

23 files changed

+1506
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# [START contactcenterinsights_create_analysis]
16+
from google.cloud import contact_center_insights_v1
17+
18+
19+
def create_analysis(conversation_name: str) -> contact_center_insights_v1.Analysis:
20+
"""Creates an analysis.
21+
22+
Args:
23+
conversation_name:
24+
The parent resource of the analysis.
25+
Format is 'projects/{project_id}/locations/{location_id}/conversations/{conversation_id}'.
26+
For example, 'projects/my-project/locations/us-central1/conversations/123456789'.
27+
28+
Returns:
29+
An analysis.
30+
"""
31+
# Construct an analysis.
32+
analysis = contact_center_insights_v1.Analysis()
33+
34+
# Call the Insights client to create an analysis.
35+
insights_client = contact_center_insights_v1.ContactCenterInsightsClient()
36+
analysis_operation = insights_client.create_analysis(
37+
parent=conversation_name, analysis=analysis
38+
)
39+
analysis = analysis_operation.result(timeout=86400)
40+
print(f"Created {analysis.name}")
41+
return analysis
42+
43+
44+
# [END contactcenterinsights_create_analysis]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# [START contactcenterinsights_create_conversation]
16+
from google.cloud import contact_center_insights_v1
17+
18+
19+
def create_conversation(
20+
project_id: str,
21+
transcript_uri: str = "gs://cloud-samples-data/ccai/chat_sample.json",
22+
audio_uri: str = "gs://cloud-samples-data/ccai/voice_6912.txt",
23+
) -> contact_center_insights_v1.Conversation:
24+
"""Creates a conversation.
25+
26+
Args:
27+
project_id:
28+
The project identifier. For example, 'my-project'.
29+
transcript_uri:
30+
The Cloud Storage URI that points to a file that contains the
31+
conversation transcript. Format is 'gs://{bucket_name}/{file.json}'.
32+
For example, 'gs://cloud-samples-data/ccai/chat_sample.json'.
33+
audio_uri:
34+
The Cloud Storage URI that points to a file that contains the
35+
conversation audio. Format is 'gs://{bucket_name}/{file.json}'.
36+
For example, 'gs://cloud-samples-data/ccai/voice_6912.txt'.
37+
38+
Returns:
39+
A conversation.
40+
"""
41+
# Construct a parent resource.
42+
parent = (
43+
contact_center_insights_v1.ContactCenterInsightsClient.common_location_path(
44+
project_id, "us-central1"
45+
)
46+
)
47+
48+
# Construct a conversation.
49+
conversation = contact_center_insights_v1.Conversation()
50+
conversation.data_source.gcs_source.transcript_uri = transcript_uri
51+
conversation.data_source.gcs_source.audio_uri = audio_uri
52+
conversation.medium = contact_center_insights_v1.Conversation.Medium.CHAT
53+
54+
# Call the Insights client to create a conversation.
55+
insights_client = contact_center_insights_v1.ContactCenterInsightsClient()
56+
conversation = insights_client.create_conversation(
57+
parent=parent, conversation=conversation
58+
)
59+
60+
print(f"Created {conversation.name}")
61+
return conversation
62+
63+
64+
# [END contactcenterinsights_create_conversation]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# Create a conversation with a TTL.
16+
# [START contactcenterinsights_create_conversation_with_ttl]
17+
from google.cloud import contact_center_insights_v1
18+
from google.protobuf import duration_pb2
19+
20+
21+
def create_conversation_with_ttl(
22+
project_id: str,
23+
transcript_uri: str = "gs://cloud-samples-data/ccai/chat_sample.json",
24+
audio_uri: str = "gs://cloud-samples-data/ccai/voice_6912.txt",
25+
) -> contact_center_insights_v1.Conversation:
26+
"""Creates a conversation with a TTL value.
27+
28+
Args:
29+
project_id:
30+
The project identifier. For example, 'my-project'.
31+
transcript_uri:
32+
The Cloud Storage URI that points to a file that contains the
33+
conversation transcript. Format is 'gs://{bucket_name}/{file.json}'.
34+
For example, 'gs://cloud-samples-data/ccai/chat_sample.json'.
35+
audio_uri:
36+
The Cloud Storage URI that points to a file that contains the
37+
conversation audio. Format is 'gs://{bucket_name}/{file.json}'.
38+
For example, 'gs://cloud-samples-data/ccai/voice_6912.txt'.
39+
40+
Returns:
41+
A conversation.
42+
"""
43+
# Construct a parent resource.
44+
parent = (
45+
contact_center_insights_v1.ContactCenterInsightsClient.common_location_path(
46+
project_id, "us-central1"
47+
)
48+
)
49+
50+
# Construct a conversation.
51+
conversation = contact_center_insights_v1.Conversation()
52+
conversation.data_source.gcs_source.transcript_uri = transcript_uri
53+
conversation.data_source.gcs_source.audio_uri = audio_uri
54+
conversation.medium = contact_center_insights_v1.Conversation.Medium.CHAT
55+
56+
# Construct a TTL.
57+
ttl = duration_pb2.Duration()
58+
ttl.seconds = 86400
59+
conversation.ttl = ttl
60+
61+
# Call the Insights client to create a conversation.
62+
insights_client = contact_center_insights_v1.ContactCenterInsightsClient()
63+
conversation = insights_client.create_conversation(
64+
parent=parent, conversation=conversation
65+
)
66+
67+
print(f"Created {conversation.name}")
68+
return conversation
69+
70+
71+
# [END contactcenterinsights_create_conversation_with_ttl]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# [START contactcenterinsights_create_issue_model]
16+
from google.cloud import contact_center_insights_v1
17+
18+
19+
def create_issue_model(project_id: str) -> contact_center_insights_v1.IssueModel:
20+
"""Creates an issue model.
21+
22+
Args:
23+
project_id:
24+
The project identifier. For example, 'my-project'.
25+
26+
Returns:
27+
An issue model.
28+
"""
29+
# Construct a parent resource.
30+
parent = (
31+
contact_center_insights_v1.ContactCenterInsightsClient.common_location_path(
32+
project_id, "us-central1"
33+
)
34+
)
35+
36+
# Construct an issue model.
37+
issue_model = contact_center_insights_v1.IssueModel()
38+
issue_model.display_name = "my-model"
39+
issue_model.input_data_config.filter = 'medium="CHAT"'
40+
41+
# Call the Insights client to create an issue model.
42+
insights_client = contact_center_insights_v1.ContactCenterInsightsClient()
43+
issue_model_operation = insights_client.create_issue_model(
44+
parent=parent, issue_model=issue_model
45+
)
46+
47+
issue_model = issue_model_operation.result(timeout=86400)
48+
print(f"Created an issue model named {issue_model.name}")
49+
return issue_model
50+
51+
52+
# [END contactcenterinsights_create_issue_model]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# [START contactcenterinsights_create_phrase_matcher_all_of]
16+
from google.cloud import contact_center_insights_v1
17+
18+
19+
def create_phrase_matcher_all_of(
20+
project_id: str,
21+
) -> contact_center_insights_v1.PhraseMatcher:
22+
"""Creates a phrase matcher that matches all specified queries.
23+
24+
Args:
25+
project_id:
26+
The project identifier. For example, 'my-project'.
27+
28+
Returns:
29+
A phrase matcher.
30+
"""
31+
# Construct a parent resource.
32+
parent = (
33+
contact_center_insights_v1.ContactCenterInsightsClient.common_location_path(
34+
project_id, "us-central1"
35+
)
36+
)
37+
38+
# Construct a phrase matcher that matches all of its rule groups.
39+
phrase_matcher = contact_center_insights_v1.PhraseMatcher()
40+
phrase_matcher.display_name = "NON_SHIPPING_PHONE_SERVICE"
41+
phrase_matcher.type_ = (
42+
contact_center_insights_v1.PhraseMatcher.PhraseMatcherType.ALL_OF
43+
)
44+
phrase_matcher.active = True
45+
46+
# Construct a rule group to match the word "PHONE" or "CELLPHONE", ignoring case sensitivity.
47+
rule_group_phone_or_cellphone = contact_center_insights_v1.PhraseMatchRuleGroup()
48+
rule_group_phone_or_cellphone.type_ = (
49+
contact_center_insights_v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType.ANY_OF
50+
)
51+
52+
for word in ["PHONE", "CELLPHONE"]:
53+
rule = contact_center_insights_v1.PhraseMatchRule()
54+
rule.query = word
55+
rule.config.exact_match_config = contact_center_insights_v1.ExactMatchConfig()
56+
rule_group_phone_or_cellphone.phrase_match_rules.append(rule)
57+
phrase_matcher.phrase_match_rule_groups.append(rule_group_phone_or_cellphone)
58+
59+
# Construct another rule group to not match the word "SHIPPING" or "DELIVERY", ignoring case sensitivity.
60+
rule_group_not_shipping_or_delivery = (
61+
contact_center_insights_v1.PhraseMatchRuleGroup()
62+
)
63+
rule_group_not_shipping_or_delivery.type_ = (
64+
contact_center_insights_v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType.ALL_OF
65+
)
66+
67+
for word in ["SHIPPING", "DELIVERY"]:
68+
rule = contact_center_insights_v1.PhraseMatchRule()
69+
rule.query = word
70+
rule.negated = True
71+
rule.config.exact_match_config = contact_center_insights_v1.ExactMatchConfig()
72+
rule_group_not_shipping_or_delivery.phrase_match_rules.append(rule)
73+
phrase_matcher.phrase_match_rule_groups.append(rule_group_not_shipping_or_delivery)
74+
75+
# Call the Insights client to create a phrase matcher.
76+
insights_client = contact_center_insights_v1.ContactCenterInsightsClient()
77+
phrase_matcher = insights_client.create_phrase_matcher(
78+
parent=parent, phrase_matcher=phrase_matcher
79+
)
80+
81+
print(f"Created {phrase_matcher.name}")
82+
return phrase_matcher
83+
84+
85+
# [END contactcenterinsights_create_phrase_matcher_all_of]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# [START contactcenterinsights_create_phrase_matcher_any_of]
16+
from google.cloud import contact_center_insights_v1
17+
18+
19+
def create_phrase_matcher_any_of(
20+
project_id: str,
21+
) -> contact_center_insights_v1.PhraseMatcher:
22+
"""Creates a phrase matcher that matches any of the specified queries.
23+
24+
Args:
25+
project_id:
26+
The project identifier. For example, 'my-project'.
27+
28+
Returns:
29+
A phrase matcher.
30+
"""
31+
# Construct a parent resource.
32+
parent = (
33+
contact_center_insights_v1.ContactCenterInsightsClient.common_location_path(
34+
project_id, "us-central1"
35+
)
36+
)
37+
38+
# Construct a phrase matcher that matches any of its rule groups.
39+
phrase_matcher = contact_center_insights_v1.PhraseMatcher()
40+
phrase_matcher.display_name = "PHONE_SERVICE"
41+
phrase_matcher.type_ = (
42+
contact_center_insights_v1.PhraseMatcher.PhraseMatcherType.ANY_OF
43+
)
44+
phrase_matcher.active = True
45+
46+
# Construct a rule group to match the word "PHONE" or "CELLPHONE", ignoring case sensitivity.
47+
rule_group = contact_center_insights_v1.PhraseMatchRuleGroup()
48+
rule_group.type_ = (
49+
contact_center_insights_v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType.ANY_OF
50+
)
51+
52+
for word in ["PHONE", "CELLPHONE"]:
53+
rule = contact_center_insights_v1.PhraseMatchRule()
54+
rule.query = word
55+
rule.config.exact_match_config = contact_center_insights_v1.ExactMatchConfig()
56+
rule_group.phrase_match_rules.append(rule)
57+
phrase_matcher.phrase_match_rule_groups.append(rule_group)
58+
59+
# Call the Insights client to create a phrase matcher.
60+
insights_client = contact_center_insights_v1.ContactCenterInsightsClient()
61+
phrase_matcher = insights_client.create_phrase_matcher(
62+
parent=parent, phrase_matcher=phrase_matcher
63+
)
64+
65+
print(f"Created {phrase_matcher.name}")
66+
return phrase_matcher
67+
68+
69+
# [END contactcenterinsights_create_phrase_matcher_any_of]

0 commit comments

Comments
 (0)